dmwm / PHEDEX

CMS data-placement suite
8 stars 18 forks source link

Node name Post-migration cleanup #1090

Open nataliaratnikova opened 7 years ago

nataliaratnikova commented 7 years ago

PhEDEx hard-codes t_adm_node.se_name value during node creation, and updates can only be done manually by the global admin. After Node name transitioning this field should no longer be used or exposed to the users.

Post-migration cleanup: Remove SE information from DB, APIs, agents, everything…

nataliaratnikova commented 7 years ago

Tested in testbed datasvc installation.

nataliaratnikova commented 7 years ago

Closed by accident, reopening.

nataliaratnikova commented 6 years ago

List of places where the old se_name from t_adm_nodes table is currently used: 1) Utilities/NodeNew - need to remove --se-name option, update usage help. Looking at the code, utility is using oracle procedure, introduced in PHEDEX_4_1_1 according to Documentation/ChangeLog. Do we need to update the procedure as well? Here it goes:

SQL> describe PROC_ADD_NODE;
PROCEDURE PROC_ADD_NODE
 Argument Name          Type            In/Out Default?
 ------------------------------ ----------------------- ------ --------
 NAME               VARCHAR2        IN
 KIND               VARCHAR2        IN
 TECHNOLOGY         VARCHAR2        IN
 SE_NAME            VARCHAR2        IN

SQL> describe PROC_DELETE_NODE;
PROCEDURE PROC_DELETE_NODE
 Argument Name          Type            In/Out Default?
 ------------------------------ ----------------------- ------ --------
 NODE               VARCHAR2        IN

SQL>

For code defining the procedures look in https://github.com/dmwm/PHEDEX/blob/master/Schema/OracleCoreFunctions.sql#L39-L62

nataliaratnikova commented 6 years ago
  1. Schema: there is a V_DBS_BLOCK_REPLICA view that contains se_name, see https://github.com/dmwm/PHEDEX/blob/master/Schema/OracleCoreViews.sql . Is it still needed/used?
SQL> select * from all_objects where object_type='VIEW' and object_name='V_DBS_BLOCK_REPLICA';

OWNER                  OBJECT_NAME            SUBOBJECT_NAME              OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE     CREATED   LAST_DDL_ TIMESTAMP       STATUS  T G S  NAMESPACE EDITION_NAME
----------------

CMS_TRANSFERMGMT           V_DBS_BLOCK_REPLICA                       310918            VIEW        26-SEP-08 19-JAN-11 2010-09-28:14:26:45 VALID   N N N      1

SQL> describe V_DBS_BLOCK_REPLICA;
 Name                                                            Null?    Type
 --------------------------------------
BLOCK_NAME                                   NOT NULL VARCHAR2(1000)
DATASET_NAME                                     NOT NULL VARCHAR2(1000)
SITE_NAME                                    VARCHAR2(4000)
SE_NAME                                  VARCHAR2(80)
SQL> 

SE_NAME can be null.

nataliaratnikova commented 6 years ago
  1. StorageConsistencyCheck script - remove --se-name option, update usage help. All checks can be done based on node name.
nataliaratnikova commented 6 years ago
  1. Data service APIs:

  2. Data Service queries:

  3. Web site : couple occurrences in https://github.com/dmwm/PHEDEX/blob/master/Documentation/WebSite/PlotConfig/src/phedexgraphs/web/__init__.py https://github.com/dmwm/PHEDEX/blob/master/Documentation/WebSite/access25