Support Questions

Find answers, ask questions, and share your expertise

CDSW change ip address

avatar
Explorer

Hi,

what changes we need to be made if we need to change the ip address of the master and worker servers?

 

Thanks

1 ACCEPTED SOLUTION

avatar
Master Guru

@ronys From CDSW Function perspective you need to adjust some Configuration as per new IP and the most important thing is forward and reverse DNS lookups MUST work. 

Apart from that you can follow fe simple steps. 

 

  1. Stop CDSW Service in Cloudera Manager (CM).
  2. Take a backup of CDSW app dir on each host by running the following command:
    tar cvzf cdsw.tar.gz /var/lib/cdsw/*
  3. Change the IP address of the host(s).
  4. Ensure that forward and reverse DNS still works (use dig or nslookup commands). If not, work with netops to fix it before proceeding.
  5. Ensure that /etc/hosts is not used for DNS. If yes, use a DNS server before proceeding.
  6. On each host, check for multiple name servers in /etc/resolv.conf. If there are multiple, work with netops to ensure that each name server recognizes the new IP address.
  7. Update CDSW config in CM with the new IP address of the CDSW master host:
     Beneath CM > CDSW > Configuration > search for "IP" and set MASTER_IP to correct IP address for CDSW master host
  8. Save Changes and run a cluster wide Deploy Client Configuration.
  9. Complete a weave reset and run prepare node on each host.
     /opt/cloudera/parcels/CDSW/cni/bin/weave reset
     Beneath CM > CDSW > Instances > Select All Instances > Prepare Node
  10. On every host, worker, and master CDSW hosts clear all iptable restrictions set up by k8s, docker, etc.
    iptables-save | awk '/^[*]/ { print $1 }
    /^:[A-Z]+ [^-]/ { print $1 " ACCEPT" ; }
    /COMMIT/ { print $0; }' | iptables-restore
  11. In CM, start docker daemon on every CDSW host (do not start the other CDSW roles).
  12. Run the weave reset on every CDSW host.
    /opt/cloudera/parcels/CDSW/cni/bin/weave reset
  13. In CM, stop all of the docker daemons.
  14. In CM, select master role > actions > Prepare Node
  15. in CM for every worker node, select worker role > Actions > Prepare Node.
  16. Start all CDSW services in CM.

Cheers!
Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.

View solution in original post

4 REPLIES 4

avatar
Master Guru

@ronys From CDSW Function perspective you need to adjust some Configuration as per new IP and the most important thing is forward and reverse DNS lookups MUST work. 

Apart from that you can follow fe simple steps. 

 

  1. Stop CDSW Service in Cloudera Manager (CM).
  2. Take a backup of CDSW app dir on each host by running the following command:
    tar cvzf cdsw.tar.gz /var/lib/cdsw/*
  3. Change the IP address of the host(s).
  4. Ensure that forward and reverse DNS still works (use dig or nslookup commands). If not, work with netops to fix it before proceeding.
  5. Ensure that /etc/hosts is not used for DNS. If yes, use a DNS server before proceeding.
  6. On each host, check for multiple name servers in /etc/resolv.conf. If there are multiple, work with netops to ensure that each name server recognizes the new IP address.
  7. Update CDSW config in CM with the new IP address of the CDSW master host:
     Beneath CM > CDSW > Configuration > search for "IP" and set MASTER_IP to correct IP address for CDSW master host
  8. Save Changes and run a cluster wide Deploy Client Configuration.
  9. Complete a weave reset and run prepare node on each host.
     /opt/cloudera/parcels/CDSW/cni/bin/weave reset
     Beneath CM > CDSW > Instances > Select All Instances > Prepare Node
  10. On every host, worker, and master CDSW hosts clear all iptable restrictions set up by k8s, docker, etc.
    iptables-save | awk '/^[*]/ { print $1 }
    /^:[A-Z]+ [^-]/ { print $1 " ACCEPT" ; }
    /COMMIT/ { print $0; }' | iptables-restore
  11. In CM, start docker daemon on every CDSW host (do not start the other CDSW roles).
  12. Run the weave reset on every CDSW host.
    /opt/cloudera/parcels/CDSW/cni/bin/weave reset
  13. In CM, stop all of the docker daemons.
  14. In CM, select master role > actions > Prepare Node
  15. in CM for every worker node, select worker role > Actions > Prepare Node.
  16. Start all CDSW services in CM.

Cheers!
Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.

avatar
Explorer

Hi GangWar,

 

Can you send me the instructions for HDP cluster ?

 

Thanks

Rony

avatar
Master Guru

@ronys There is no logical difference in CDSW on HDP. You just have to run same instructions from command line just the path for that will change to /etc/cdsw/scripts instead of /opt/cloudera/parcels/CDSW/scripts. 

 

 


Cheers!
Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.

avatar
Explorer

Hi @GangWar

it works fine now

Thanks,

Rony