3

Is there anyone who can tell me how to modify both public and private IP of juju bootstrap node stored in mongodb?

I have an all in one openstack server. This week, I launched a vm named juju-core and installed software package juju-core on it. By using the command juju bootstrap , I successfully got a juju bootstrap node, which is also a vm on openstack, running very well. And now I have a problem and don't know how to solve it. I created a snapshot of the juju bootstrap vm and named it juju-bootstrap-snapshot. After that, I launch a new instance, which is named juju bootstrap-1, from that snapshot.

In order to connect to juju bootstrap-1 I have to login to juju-core vm and modify IP address of state-servers in

/home/$user/.juju/environments/openstack.jenv.

When I run the command juju status on the juju-core vm, there is always no response. So I login to juju bootstrap-1 to try finding out what happened; and I found there's no process listening on port 17070.

> netstat -ntulp

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:6514            0.0.0.0:*               LISTEN      838/rsyslogd    
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      970/sshd        
tcp        0      0 0.0.0.0:37017           0.0.0.0:*               LISTEN      932/mongod      
tcp        0      0 0.0.0.0:38017           0.0.0.0:*               LISTEN      932/mongod      
tcp6       0      0 :::6514                 :::*                    LISTEN      838/rsyslogd    
tcp6       0      0 :::22                   :::*                    LISTEN      970/sshd        
udp        0      0 0.0.0.0:68              0.0.0.0:*                           587/dhclient    
udp        0      0 0.0.0.0:15712           0.0.0.0:*                           587/dhclient    
udp6       0      0 :::52056                :::*                                587/dhclient

But the jujud is running

>ps aux | grep juju
root       932  0.6  2.1 3516932 44336 ?       Ssl  Jan15   7:08 /usr/lib/juju/bin/mongod --auth --dbpath=/var/lib/juju/db --sslOnNormalPorts --sslPEMKeyFile /var/lib/juju/server.pem --sslPEMKeyPassword xxxxxxx --bind_ip 0.0.0.0 --port 37017 --noprealloc --syslog --smallfiles --journal --keyFile /var/lib/juju/shared-secret --replSet juju --oplogSize 817<p>
root       935  0.2  0.6 426096 14032 ?        Ssl  Jan15   2:37 /var/lib/juju/tools/machine-0/jujud machine --data-dir /var/lib/juju --machine-id 0 --debug

I also modified apiaddresses in /var/lib/juju/agents/machine-0/agent.conf on vm juju bootstrap-1; just to make sure that juju end-point will be listening on port 17070. But there is still no process listening on port 17070.

By using another tool, juju-dbinspect, I found that both public IP and private IP of the original juju bootstrap node are stored in mongodb. So I try to modify related tables in mysql of openstack neutron and nova just to make sure that the new juju bootstrap node can obtain the IP of the original juju bootstrap node. After I get this done, the juju end-point started successfully and there is a service listing on port 17070 of the new juju bootstrap node. Everything works again.

When doing jobs in openstack; creating a snapshot of a vm, launching a vm from a snapshot is very common usage. I don't know why juju bootstrap node vm won't work in such situation. Please let me know if I missed anything. According to what I have done, the new vm juju bootstrap-1 should work very well if I can modify both public IP and private IP of the original juju bootstrap node stored in mongodb on it. But I don't know how to do it. Anyone who can tell me how to do it will be very appriciated.

Thank you, Jeff

0

You must log in to answer this question.

Browse other questions tagged .