Absent Member.
Absent Member.
1474 views

Changing Node Property 'Use SSH during installation' from Commandline

Jump to solution

Hello

 

What is the commandline version of changing the "Use SSH during installation" in the node properties?

We are running OMU 09.10.220.

 

Background:

When we add a new virtual node (i.e. cluster package) we do these steps:

  1. add the node with opcnode -add_node
  2. log into the OMU Admin UI, edit the Node and untick "Use SSH during installation" in the tab "Installation"
  3. change the node with opcnode -set_virtual

I am looking to script the whole sequence, the missing piece is the SSH setting. This has to be set to off or else opcnode -set_virtual won't work.

 

Thanks,

Michael

 

---------------------------------------------------------------------------------
Navigation: Forum Site Map // ye olde ITRC Tree
@HP: please get rid of the Passport login timeout
Labels (1)
0 Likes
1 Solution

Accepted Solutions
Absent Member.
Absent Member.

Hello.

 

First I have to correct myself - the correct attribute to change is this one (sorry about the error; I should have tested this by modifying the tool):

 

    opcdata_set_long(node, OPCDATA_DEPOT_ACCESS_METHOD, OPC_DEPOT_FTP_METHOD);

 

As for your question - sure, it's possible, but obviously not something one would recommend as a general practice.  You'll find this field in the OPC_NODES table (DEPOT_ACCESS_METH) - see the Database Schema document and:

 

    grep OPC_DEPOT_FTP_METHOD /opt/OV/include/opcsvapi.h

Let me know if you need help with the itonode tool.

 

Regards,

    Goran

View solution in original post

4 Replies
Absent Member.
Absent Member.

Hello.

 

The opcnode tool has no option to change this flag.  You could modify this tool to achieve what you want:

 

/opt/OV/OpC/examples/progs/itonode.c

 

You need to set the OPCDATA_INSTALL_METHOD attribute to OPC_INSTALL_OpC like so:

 

    opcdata_set_long(node, OPCDATA_INSTALL_METHOD, OPC_INSTALL_OpC);

 

Using this tool you could add node and set its installation method in one go.  The issue with this tool is that it's a bit outdated so it's also missing new architectures (machine types) and communication types so you would need to add that too.

 

Regards,

    Goran

 

Absent Member.
Absent Member.

Thanks for your great suggestion Goran. I'll try to have something hacked in C and will post it here if I succeed (not very likely).

 

Would it also be possible to change the flag in the database directly with opcdbpwd -exe sqlplus -s ?

---------------------------------------------------------------------------------
Navigation: Forum Site Map // ye olde ITRC Tree
@HP: please get rid of the Passport login timeout
0 Likes
Absent Member.
Absent Member.

Hello.

 

First I have to correct myself - the correct attribute to change is this one (sorry about the error; I should have tested this by modifying the tool):

 

    opcdata_set_long(node, OPCDATA_DEPOT_ACCESS_METHOD, OPC_DEPOT_FTP_METHOD);

 

As for your question - sure, it's possible, but obviously not something one would recommend as a general practice.  You'll find this field in the OPC_NODES table (DEPOT_ACCESS_METH) - see the Database Schema document and:

 

    grep OPC_DEPOT_FTP_METHOD /opt/OV/include/opcsvapi.h

Let me know if you need help with the itonode tool.

 

Regards,

    Goran

View solution in original post

Absent Member.
Absent Member.

Thanks again Goran!

 

Now I can script the whole sequence by changing the flag directly in the DB like so:

echo "UPDATE OPC_NODES SET DEPOT_ACCESS_METH='1' WHERE AGENT_ID='$(opcnode -list_id node_name=$fqdn | awk '/ID = / {print $NF}')';" | opcdbpwd -e sqlplus -s

While not as clean as using the C APIs it was a lot easier for me to implement 🙂

 

Regards,

Michael

 

---------------------------------------------------------------------------------
Navigation: Forum Site Map // ye olde ITRC Tree
@HP: please get rid of the Passport login timeout
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.