Re: [Rocks-Discuss] IP change on frontend

154 views
Skip to first unread message

H P

unread,
Jul 12, 2011, 1:55:49 PM7/12/11
to Discussion of Rocks Clusters
Hi

We have changed IP, subnet and netmask with following commands...

rocks set network netmask public <new netmask>
rocks set network subnet public <new subnet>
rocks set host interface ip frontend eth1 <new ip address>

These commands changed entries in database for related tables. However
it didn't change values in table global_attributes which has
values like Kickstart_Public[adress/network/broadcast/gateway]. When
we searched on web for commands which will change

this attrs in database , we found few commands but it looks like those
commands doesn't work with Rocks 5.4.

command: rocks set var Kickstart PublicAddress <IP>

Since we know where these values are in database we can try changing values
in 'global_attributes' table. But I guess that in not the ideal way of doing
as some other conf file or table may have same info stored.

Now there are 3 main issues.

[1] How to changes entries*[**
Kickstart_Public[adress/network/broadcast/gateway]** *in database with rocks
command (or by other recommended alternative way)

[2] How to change gateway in database?

[3] How to push related configuration files to compute nodes?

Regards
HP

On 12 July 2011 15:53, "Hung-Sheng Tsao (Lao Tsao 老曹) Ph.D." <
lao...@gmail.com> wrote:

> not sure how did you change your IP, but rocks has its own way
> 1)run rocks dump will give you some info how to set some ip address
> 2)cd /etc then do find . -print |xargs grep <ip> $1 for all ip that you
> want to change to see where are they store in the system
> 3)download webmin so you can edit the mysql database directly
> http://www.webmin.com/download.html
> of course you will need to change mysql db and system file or run rock cmd
> HTH
>
>
> On 7/6/2011 8:50 AM, H P wrote:
> > Hi All
> >
> > We have recently changed IP on our cluster and we did "rocks sync
> config".
> > However we found that entry in /etc/hosts files is unchanged. It still
> has
> > original IP of the instrument. Do we need to manually edit the entry in
> > /etc/hosts or is there any command which will put the correct entry in
> it.
> >
> > Regards
> > HP
> > -------------- next part --------------
> > An HTML attachment was scrubbed...
> > URL:
> https://lists.sdsc.edu/pipermail/npaci-rocks-discussion/attachments/20110706/4d42ee6b/attachment.html
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: laotsao.vcf
> Type: text/x-vcard
> Size: 653 bytes
> Desc: not available
> Url :
> https://lists.sdsc.edu/pipermail/npaci-rocks-discussion/attachments/20110712/e4fafe2c/laotsao.vcf
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.sdsc.edu/pipermail/npaci-rocks-discussion/attachments/20110712/4574e4dc/attachment.html

Philip Papadopoulos

unread,
Jul 12, 2011, 8:27:26 PM7/12/11
to Discussion of Rocks Clusters
On Tue, Jul 12, 2011 at 10:55 AM, H P <linuxc...@msn.com> wrote:

> Hi
>
> We have changed IP, subnet and netmask with following commands...
>
> rocks set network netmask public <new netmask>
> rocks set network subnet public <new subnet>
> rocks set host interface ip frontend eth1 <new ip address>
>
> These commands changed entries in database for related tables. However
> it didn't change values in table global_attributes which has
> values like Kickstart_Public[adress/network/broadcast/gateway]. When
> we searched on web for commands which will change
>
> this attrs in database , we found few commands but it looks like those
> commands doesn't work with Rocks 5.4.
>
> command: rocks set var Kickstart PublicAddress <IP>
>
> Since we know where these values are in database we can try changing values
> in 'global_attributes' table. But I guess that in not the ideal way of
> doing
> as some other conf file or table may have same info stored.
>
> Now there are 3 main issues.
>
> [1] How to changes entries*[**
> Kickstart_Public[adress/network/broadcast/gateway]** *in database with
> rocks
> command (or by other recommended alternative way)
>

rocks set attr

>
> [2] How to change gateway in database?
>

also an attribute. Try rocks list attr

>
> [3] How to push related configuration files to compute nodes?
>

Reinstall is guaranteed to work (assuming all entries have changed in the
DB).
A
rocks sync host network
should get the appropriate changes (but hat is not guaranteed)
-P


--
Philip Papadopoulos, PhD
University of California, San Diego
858-822-3628 (Ofc)
619-331-2990 (Fax)


-------------- next part --------------
An HTML attachment was scrubbed...

URL: https://lists.sdsc.edu/pipermail/npaci-rocks-discussion/attachments/20110712/e5f91eaa/attachment.html

"Hung-Sheng Tsao (Lao Tsao 老曹) Ph.D."

unread,
Jul 12, 2011, 8:42:02 PM7/12/11
to npaci-rocks...@sdsc.edu

On 7/12/2011 1:55 PM, H P wrote:
> Hi
>
> We have changed IP, subnet and netmask with following commands...
>
> rocks set network netmask public<new netmask>
> rocks set network subnet public<new subnet>
> rocks set host interface ip frontend eth1<new ip address>
>
> These commands changed entries in database for related tables. However
> it didn't change values in table global_attributes which has
> values like Kickstart_Public[adress/network/broadcast/gateway]. When
> we searched on web for commands which will change
>
> this attrs in database , we found few commands but it looks like those
> commands doesn't work with Rocks 5.4.
>
> command: rocks set var Kickstart PublicAddress<IP>
>
> Since we know where these values are in database we can try changing values
> in 'global_attributes' table. But I guess that in not the ideal way of doing
> as some other conf file or table may have same info stored.
>
> Now there are 3 main issues.
>
> [1] How to changes entries*[**
> Kickstart_Public[adress/network/broadcast/gateway]** *in database with rocks
> command (or by other recommended alternative way)

for example
> /opt/rocks/bin/rocks set attr Kickstart_PublicAddress 192.168.2.15
> /opt/rocks/bin/rocks set attr Kickstart_PublicNetwork 192.168.2.0
> /opt/rocks/bin/rocks set attr Kickstart_PublicBroadcast 192.168.2.255
> /opt/rocks/bin/rocks set attr Kickstart_PublicGateway 192.168.2.1
> /opt/rocks/bin/rocks set attr Kickstart_PublicDNSServers 192.168.2.1
> /opt/rocks/bin/rocks set network public subnet=192.168.2.0
> netmask=255.255.255.0 mtu=1500
> /opt/rocks/bin/rocks set host route localhost 0.0.0.0 192.168.2.1
> netmask=0.0.0.0
> /opt/rocks/bin/rocks set route 192.168.2.15 10.1.54.1
> netmask=255.255.255.255

>
> [2] How to change gateway in database?

see route and gateway
> /opt/rocks/bin/rocks set attr Kickstart_PrivateGateway 10.1.54.1
> /opt/rocks/bin/rocks set attr Kickstart_PublicGateway 192.168.2.1


>
> [3] How to push related configuration files to compute nodes?

after
rocks sync network
rocks sync config
re-install compute nodes
FYI on compute node
cd /etc contain 192.168.2.15
> /hosts:192.168.2.15 cluster-sge.hopbit.com
> ./yum.conf:baseurl=http://192.168.2.15/install/rocks-dist/x86_64
> ./sysconfig/static-routes:any host 192.168.2.15 gw 10.1.54.1
> ./sysconfig/RCS/static-routes,v:@any host 192.168.2.15 gw 10.1.54.1
> ./RCS/hosts,v:192.168.2.15 cluster-sge.hopbit.com
> ./RCS/yum.conf,v:baseurl=http://192.168.2.15/install/rocks-dist/x86_64

on frontend
cd /etc
> ./RCS/resolv.conf,v:nameserver 192.168.2.1
> ./RCS/yum.conf,v:baseurl=http://192.168.2.15/install/rocks-dist/x86_64
> ./sysconfig/static-routes:any host 192.168.2.15 gw 10.1.54.1
> ./sysconfig/network-scripts/ifcfg-eth1:IPADDR=192.168.2.15
> ./sysconfig/iptables:-A INPUT -i eth1 -p tcp --dport https -m state
> --state NEW --source 192.168.2.0/255.255.255.0 -j ACCEPT
> ./sysconfig/iptables:-A INPUT -i eth1 -p tcp --dport www -m state
> --state NEW --source 192.168.2.0/255.255.255.0 -j ACCEPT
> ./sysconfig/network:GATEWAY=192.168.2.1
>
> ./resolv.conf:nameserver 192.168.2.1
> ./yum.conf:baseurl=http://192.168.2.15/install/rocks-dist/x86_64
> ./named.conf: forwarders { 192.168.2.1; };
> ./hosts:192.168.2.15 cluster-sge.hopbit.com

Url : https://lists.sdsc.edu/pipermail/npaci-rocks-discussion/attachments/20110712/14944282/laotsao.vcf

H P

unread,
Jul 13, 2011, 3:35:44 AM7/13/11
to Discussion of Rocks Clusters, prave...@gmail.com
Hi Philip and Hung,

We have tried your suggestions.

rocks set attr Kickstart_Public* < ip | network | dns | broadcast | gateway
> has changed values in database 'global_attributes' table.

So looks like everything is fixed on frontend except main gateway.
Kickstart_PrivateGateway and Kickstart_PublicGateway are changed but not
able to see changes.

'rocks report host network' still shows old gateway. We also checked for
entries in /etc/sysconfig/network and there is no entry for GATEWAY in it.

We tried to set the gateway with UI in frontend. However whenever we restart
the network service it goes blank and needs to be set again.

[root@rash sysconfig]# rocks report host network
rash: <file name="/etc/sysconfig/network">
rash: NETWORKING=yes
rash: HOSTNAME=rash.local.com
rash: GATEWAY=192.168.20.1
rash: </file>
compute-0-0: <file name="/etc/sysconfig/network">
compute-0-0: NETWORKING=yes
compute-0-0: HOSTNAME=compute-0-0.local
compute-0-0: GATEWAY=10.1.1.1
compute-0-0: </file>
compute-0-1: <file name="/etc/sysconfig/network">
compute-0-1: NETWORKING=yes
compute-0-1: HOSTNAME=compute-0-1.local
compute-0-1: GATEWAY=10.1.1.1
compute-0-1: </file>
compute-0-2: <file name="/etc/sysconfig/network">
compute-0-2: NETWORKING=yes
compute-0-2: HOSTNAME=compute-0-2.local
compute-0-2: GATEWAY=10.1.1.1
compute-0-2: </file>
[root@rash sysconfig]#


We have not tried re-building compute nodes as we want to make sure that
front-end is perfect before doing it.

Regards
HP

On 13 July 2011 06:12, "Hung-Sheng Tsao (Lao Tsao 老曹) Ph.D." <
lao...@gmail.com> wrote:

URL: https://lists.sdsc.edu/pipermail/npaci-rocks-discussion/attachments/20110713/e7eb0492/attachment.html

"Hung-Sheng Tsao (Lao Tsao 老曹) Ph.D."

unread,
Jul 13, 2011, 5:54:36 AM7/13/11
to npaci-rocks...@sdsc.edu

On 7/13/2011 3:35 AM, H P wrote:
> Hi Philip and Hung,
>
> We have tried your suggestions.
>
> rocks set attr Kickstart_Public*< ip | network | dns | broadcast | gateway
>> has changed values in database 'global_attributes' table.
> So looks like everything is fixed on frontend except main gateway.
> Kickstart_PrivateGateway and Kickstart_PublicGateway are changed but not
> able to see changes.
>
> 'rocks report host network' still shows old gateway. We also checked for
> entries in /etc/sysconfig/network and there is no entry for GATEWAY in it.

may be just add GATEWAY

Url : https://lists.sdsc.edu/pipermail/npaci-rocks-discussion/attachments/20110713/c374a3ce/laotsao.vcf

H P

unread,
Jul 13, 2011, 11:37:29 AM7/13/11
to Discussion of Rocks Clusters
We have tried it , but it didnt help

On 13 July 2011 15:24, "Hung-Sheng Tsao (Lao Tsao 老曹) Ph.D." <
lao...@gmail.com> wrote:

URL: https://lists.sdsc.edu/pipermail/npaci-rocks-discussion/attachments/20110713/6bb1b4b8/attachment.html

Thomas Indelli

unread,
Jul 15, 2011, 1:58:49 AM7/15/11
to Discussion of Rocks Clusters
I'm wondering if perhaps the GATEWAY field is being cleared because the one you specified is invalid for the network. When you specified the Kickstart_PublicGateway attribute, did you put the gateway for your public interface (external IP) which should differ from your Kickstart_PrivateGateway entry? The cluster I was doing this on before has entered production now, so I don't want to test things out over SSH while an hour away from the office at 1 AM, but I would make sure you have the appropriate values set for Kickstart_Public* which should differ from Kickstart_Private*. You can check by running /opt/rocks/bin/mysql -uroot -p cluster and doing "SELECT * from global_attributes" to see all the attributes.

-Tom


--
Tom Indelli
tind...@uchicago.edu
Systems Administrator
Physical Sciences Division
The University of Chicago
Reply all
Reply to author
Forward
0 new messages