change netconfig programatically?

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf change netconfig programatically?

  • Creator
    Topic
  • #48657
    Julie Kimmel
    Participant

      Hello again,

      I am wondering,

      is there a way ( a set of commands or something) to can change the IP address and ports of a thread programatically?

      I am wanting to create a Disaster Recovery script that will down the site, change the addresses and ports of threads in the netconfig, and restart the site. I am having troubles finding how to change the netconfig settings….or can I simply manipulate the strings in the netconfig file…would that work?

      Thank you,

      Julie

    Viewing 7 reply threads
    • Author
      Replies
      • #59299
        garry r fisher
        Participant

          Hi Julie,

          Yes it is. A Netconfig file is simply(?) a set of keyed lists. So if you know Tcl and keyed lists then you should be able to do this. A more expensive option but easier to implement might be a HA solution.

          Regards

          Garry

        • #59300
          Julie Kimmel
          Participant

            Super,

            Thank you very much!

          • #59301
            Steve Carter
            Participant

              Yes.  The NetConfig can be modified programatically.  The easiest way I’ve found is to use the ‘net*’ commands.  You can get a list of these commands by going into hcitcl and entering the following:

              hcitcl>netcfgLoad

              1

              hcitcl>info commands net*

              netcfgGetConnList netcfgModified netcfgIsConnInProcess netcfgGetGroupConns netcfgIsConnInGroup netcfgGetConnCount netcfgGetGroupList

              netcfgGetProcData netcfgGetGroupCount netcfgLoad netcfgGetProcConns netconfig netcfgGetConnData netcfgGetProcList netcfgGetProcCoun

              t netcfgGetVersion

              I generally will do a complete rebuild of the NetConfig (prologue, process, protocol) if I make any changes via a script.

              Feel free to shoot me an email if you have any questions.

              Steve

            • #59302
              Anonymous
              Participant

                Julie. Not sure if this is relevant to you or not.  We are running under AIX and or DR box is off site.  So we don’t mess with the netconfig but we change the /etc/hosts and /etc/services to reflect the DR ancillary system. That way we don’t have mess with any of the clover leaf stuff.

              • #59303
                Julie Kimmel
                Participant

                  Thank you all for all of your help!

                  Just to clear up my situation, I am actually approaching our DR from two different directions. I have an offsite DR engine in case our production Cloverleaf faces disaster, and then I am also working with our production Cloverleaf to redirect messages to application DRs, if those applications fail…which I guess that is actually more of a ‘fail over’.

                  So, if anyone else out there in cloverworld has any more good tips and tricks on that topic, I am interested.

                  Thanks,

                  Julie

                • #59304
                  Julie Kimmel
                  Participant

                    Hello again!

                    In looking at the netcfg* commands…I am seeing a lot of ‘get’ commands…but no update or put, or write commands.

                    Does anyone know if there exist any commands to update the netconfig?

                    Thanks,

                    Julie

                  • #59305
                    Steve Carter
                    Participant

                      As far as I know, there are no commands to ‘put’ back to the NetConfig.  That is why I ‘rebuild’ it whenever I make any changes.

                      I’ve created some code to mass replace certain components within the protocol threads.  In short, here’s what I do:

                      1.  Use the prologue commands to create a new prologue (append to newNetConfigList)

                      2.  A quick loop through the processes to rebuild each process (append each to newNetConfigList)

                      3.  I then go through each protocol thread and replace whatever it is I’m looking for. (append each to newNetConfigList)

                      4.  Join newNetConfigList with n and write back out to file.

                      You can find the prologue commands in hcitcl ( I only use makeBasicPrologueList and writePrologue:

                      hcitcl>netcfgLoad

                      1

                      hcitcl>info commands *Prologue*

                      putNetPrologue checkPrologueList writePrologue readPrologue makeBasicPrologueList

                      Hope this helps.

                      Steve

                    • #59306
                      Richard Hart
                      Participant

                        Julie.

                        Could you use DNS entries to assist?

                    Viewing 7 reply threads
                    • The forum ‘Cloverleaf’ is closed to new topics and replies.