Delphix Toolkits (dxToolkit and dxmToolkit)

 View Only
Expand all | Collapse all

problem with onboaring new users to delphix engine

Jump to Best Answer
  • 1.  problem with onboaring new users to delphix engine

    Posted 07-01-2022 06:59:00 AM
    Hi Team,

    I am trying to onboard users to delphix (not add them to a container).

    The command I am using is:

    for usr in `cat user.lst | awk -F, '{print $2}'` ; do
    ${TOOLKIT}/dx_ctl_js_container -d ${engine_nm} -configfile ${CONFIG_AREA}/dx_${engine_nm}.conf -action addowner -container_name ${category}${CHRR}${number} -container_owner ${usr}

    And the errot I get is as follows:

    oracle:swpdzx5.nonprod.sddc.stockex.local:vx-669969877@DUMMY $ ${TOOLKIT}/dx_ctl_users -d dxswpz03 -configfile dx_dxswpz03.conf -file /nfs/oradump_dba/delphix/app_specific/swapclear/atlas/provisioning/preprod/user.lst
    Set Delphix Admin to N .Set Jet Stream user to Y .Problem with setting privileges
    Cannot grant a replicated role to a user.Problem with update: The operation could not be completed because one or more objects are replicated. Replicated objects cannot be modified.

    User Elango.Murugaiyan doens't exist. Can't update
    User Yogeshwari.B doens't exist. Can't update
    ...
    ...

    Why would we be getting this error?

    'Cannot grant a replicated role to a user.Problem with update: The operation could not be completed because one or more objects are replicated. Replicated objects cannot be modified.'


    I tried a second time with sysadmin user listed in the config file but now a different error;

    I tried again using the sysadmin account in the delphix config account and now get a different error:

    oracle:swpdzx5.nonprod.sddc.stockex.local:vx-669969877@DUMMY $ ${TOOLKIT}/dx_ctl_users -d dxswpz03 -configfile dx_dxswpz03.conf -file /nfs/oradump_dba/delphix/app_specific/swapclear/atlas/provisioning/preprod/user.lst

    User admin domain DOMAIN is differtent than login user domain SYSTEM. Skipping
    User Elango.Murugaiyan domain DOMAIN is differtent than login user domain SYSTEM. Skipping
    ...
    ...
    ...



    Any ideas whats going on?

    I attach the user list we are trying to onboard.

    Thanks for any help.

    Best regards,

    John

    ------------------------------
    JOHN DICKINSON
    Mr
    London Stock Exchange Group
    ------------------------------


  • 2.  RE: problem with onboaring new users to delphix engine

    Posted 07-01-2022 03:53:00 PM
    Hi John-

    Regarding the 2nd error mentioned, the Engine has three types of user, between two "domains".  Self Service and dataset 'managing' users exist in DOMAIN, and System Setup capable users exist in SYSTEM domain. You cannot use a SYSTEM user to manage DOMAIN (data administrator) type users, or operations.  Compare this to the web UI; your sysadmin login only works for System Setup, and from System Setup you cannot manage your other dataset-administering users.

    It is difficult to speak to the details of the error encountered, but the messaging you included suggests that something in the transaction is related to a replicated object or users included in these dependencies.  Do these users exist in the primary namespace?

    Is the intention to create new users, or to add an existing user to Self Service container? As you mention "I am trying to onboard users to delphix (not add them to a container).",the intention is unclear, since your command usage suggests you are trying to add an existing user to an existing Self Service container.

    You also mention the user list is attached, but unfortunately I'm not seeing it rendered in your post; perhaps if this was included we could offer further feedback.

    ------------------------------
    Sean Nothdurft
    Senior Principal Technical Support Engineer
    Delphix
    ------------------------------



  • 3.  RE: problem with onboaring new users to delphix engine

    Posted 07-04-2022 11:47:00 AM

    Thank you sean for your feedback.

    Actually I am trying to onboard users initially before wanting to add them to container later.

    Actually I thourght the same command was used 

    ${TOOLKIT}/dx_ctl_users -d <engine> -configfile dx_<engine>.conf -file user.lst

    Please find attached the list of users.

    Should I be using a different script instead of dx_ctl_users?
    Thank you very much for your help.

    Best regards,

    John



    ------------------------------
    JOHN DICKINSON
    Mr
    London Stock Exchange Group
    ------------------------------



  • 4.  RE: problem with onboaring new users to delphix engine

    Posted 07-06-2022 12:06:00 PM
    Edited by Michael Torok 07-06-2022 02:27:12 PM

    Hi John,
    Are you attaching the file to an email response to the community? If so, that may be why we are not seeing the attachment. From within the community, if you click Reply and begin to post your message, you will see the Upload File button, as seen here:
    That will allow you to upload a file to the community post.

    That said, the allowable list of both email attached and uploadable files is quite extensive. 



    Thanks,
    Michael

    ------------------------------
    Michael Torok
    Community Mgmt & Experience, Sr. Director
    Delphix
    ------------------------------



  • 5.  RE: problem with onboaring new users to delphix engine

    Posted 07-09-2022 04:28:00 AM
      |   view attached

    Hi Micheal,

    Thank you very much for your reply.

    Please find the uploaded file.

    Any ideas why I cant seem to onboard users initially?

    Thanks for any help.

    John



    ------------------------------
    JOHN DICKINSON
    Mr
    London Stock Exchange Group
    ------------------------------

    Attachment(s)

    txt
    user.txt   2 KB 1 version


  • 6.  RE: problem with onboaring new users to delphix engine
    Best Answer

    Posted 07-09-2022 11:18:00 AM
    Hi John-

    Thanks for the clarification.  So reviewing your previous posts, initially you provided examples of command execution using dx_ctl_js_container- this command is specifically intended to control Self Service (formerly Jetstream) containers.

    https://github.com/delphix/dxtoolkit/wiki/dx_ctl_js_container

    You did mention:
    "Actually I am trying to onboard users initially before wanting to add them to container later."

    Any manipulation of objects to add users, etc, definitely requires those users to be present on the Engine first. The expected command to onboard a user would be dx_ctl_users, which we notice dx_ctl_js_container may implicitly call or use (based on your command output).

    https://github.com/delphix/dxtoolkit/wiki/dx_ctl_users

    Your CSV file provided includes fields as defined by the following headers:
    #Command,Username,First Name,Last Name,Email,work phone,home phone,mobile phone,Authtype,principal,password,admin_priv,js_user
    As per the usage for dx_ctl_users, we find the -file filename specifies... "CSV file name with user definition and actions. Field list as follow:

    command, username, firstname, lastname, email, workphone, homephone, mobilephone, authtype, principal, password, admin_priv, js_user, timeout, apiUser

    Allowed command values:

      C - create user
      D - delete user
      U - update user
      L - lock user
      E - enable user

    From the file you've provided, every user entry row includes command = U, which means you're attempting to update an existing user. 

    ~/work/dxtoolkit/dxtoolkit2$ awk -F, '{print $1}' users.txt | sort | uniq -c
    1
    1 #Command
    19 U

    If you wish to create a user, that option needs to be changed accordingly.  If I take your user list and change the command field from U(pdate) to C(reate), we see this works without issue.

    ~/work/dxtoolkit/dxtoolkit2$ sed -i '' 's/U/C/g' users.txt
    ~/work/dxtoolkit/dxtoolkit2$ awk -F, '{print $1}' users.txt | sort | uniq -c
    1
    1 #Command
    19 C
    ~/work/dxtoolkit/dxtoolkit2$ ./dx_ctl_users -d sean6013 -file users.txt
    User Rajesh.Gorle create
    User Elango.Murugaiyan created.
    User Yogeshwari.B created.
    User Gurminder.SinghSooch created.
    User abilash.jaishankar1 created.
    User Mikko.Lam created.
    User Barry.Callaghan created.
    User Ranodeep.Ghosh created.
    User Akshay.R created.
    User Pratibha.Singh created.
    User Punita.Chowdhry created.
    User Rajesh.Gorle exist. Skipping
    User AjitKumar.Panda created.
    User Supun.Samaraweera created.
    User Michelle.Warden created.
    User Peter.Ward created.
    User Liam.Barclay created.
    User Paul.Kirkwood created.
    User Obi.Ezeakachi created.

    Please review the details of command usage for the dxToolkit options discussed, and be sure to align the commands and the input files with the intended action, and let us know if you run into any other issues.



    ------------------------------
    Sean Nothdurft
    Senior Principal Technical Support Engineer
    Delphix
    ------------------------------



  • 7.  RE: problem with onboaring new users to delphix engine

    Posted 07-12-2022 05:19:00 AM

    Hi Sean and Micheal,

    Thank you very much for the extremely useful and prommpt reply. VEry much appreciated Thank you.

    I believe I know where Im going wrong now!

    I need to update our config and re-run.
    Thank you again and if you prefer I can update this thread with details of results.

    Best regards,

    John




    ------------------------------
    JOHN DICKINSON
    Mr
    London Stock Exchange Group
    ------------------------------



  • 8.  RE: problem with onboaring new users to delphix engine

    Posted 07-12-2022 09:40:00 AM
    Hi John,
    It would be great to take the conversation full circle and know you got the results you were looking for. Thank you!

    Michael

    ------------------------------
    Michael Torok
    Community Mgmt & Experience, Sr. Director
    Delphix
    ------------------------------



  • 9.  RE: problem with onboaring new users to delphix engine

    Posted 07-14-2022 07:11:00 AM

    Hi Sean,

    Thank you for your info.

    I have been able to create the users.

    Howver they seem to have been created as Standard Users by default.

    Is it possible to specify them to be Self Service users instead?

    I wasnt able to see how to do this in the doc, dx_ctl_users · delphix/dxtoolkit Wiki · GitHub

    Is it possible to update the users later to Self Service?

    Thanks for any feedback.

    Best regards,

    John



    ------------------------------
    JOHN DICKINSON
    Mr
    London Stock Exchange Group
    ------------------------------



  • 10.  RE: problem with onboaring new users to delphix engine

    Posted 07-14-2022 09:08:00 AM
    Hi John-

    I'm glad to hear the feedback was helpful!  Assuming the same input file was used, the users would have been expected to be added as Self Service users; the last column of the CSV defines if the user is Self Service, and when I used your input file to add these users they came in as expected:

    Regardless, going back to the original 'diagnosis' of the users file you attached... I initially altered the file to modify the first column that contained U, for update of an existing user, and changed it to C for user creation; we can simply invert that change, and ensure that the columns align with our desired user privileges and then run the command again.

    I first toggle the users created to be non-Self Service to simulate your condition.

    Then, I'll modify the file to change the fields for Command = U for update, and js_user = Y. So we should see:

    ~/work/dxtoolkit/dxtoolkit2$ awk -F, '{print $1, $NF}' users.txt
    #Command js_user
    U Y
    U Y
    U Y
    ...

    Then, when I run the dx_ctl_users command again, we'll see the change committed:

    ~/work/dxtoolkit/dxtoolkit2$ ./dx_ctl_users -d sean6013 -file users.txt
    Set Jet Stream user to Y .User Rajesh.Gorle updated.
    Set Jet Stream user to Y .User Elango.Murugaiyan updated.
    ...

    Otherwise, you can also certainly toggle the users in the GUI or CLI, but if you wish to leverage the dxToolkit methods, this should work for you.

    I also neglected to mention, you should use caution when leveraging sed for the character replacement; depending on your platform and version of sed, it may replace multiple instances of a character in a line. I point this out because you are updating a file with LDAP users, which include "CN" and "OC" and "DC" in the LDAP principal, so flipping C to U may cause other edits that are not desired.



    ------------------------------
    Sean Nothdurft
    Senior Principal Technical Support Engineer
    Delphix
    ------------------------------



  • 11.  RE: problem with onboaring new users to delphix engine

    Posted 07-15-2022 03:54:00 AM
      |   view attached

    Hi Sean,

    Thank you for your reply.

    I should have mentioned that I modified the users file to reflect the LDAP authentication requirement for each user.

    Perhaps this was why the users were created as Standard Users?

    I upload the new users file I tested with yesterday.
    To be honest Im not sure if I am using the right syntax in the file for LDAP as well.

    Any help on how to modify this list of users to reflect the LDAP requirement and the SS requirement as well?

    Thanks you for your support.

    Best regards,

    John



    ------------------------------
    JOHN DICKINSON
    Mr
    London Stock Exchange Group
    ------------------------------

    Attachment(s)

    txt
    createusers.txt   1 KB 1 version


  • 12.  RE: problem with onboaring new users to delphix engine

    Posted 07-15-2022 09:31:00 AM
    Hi John-

    I used the same file you provided, and the users were created without issue; they included LDAP credentials and were defined as Self Service, as expected, so offhand I can't offer much more insight as to why your behavior was different.  I tested with dxToolkit 2.4.14 against a 6.0.13 and 6.0.15 Engine.

    Assuming the CSV file matched what you provided initially, it should work. As mentioned yesterday, if you did mirror my command usage, there's a possibility that you had some extra character replacement that altered the parameters.

    ------------------------------
    Sean Nothdurft
    Senior Principal Technical Support Engineer
    Delphix
    ------------------------------