Network reset does not add IP correctly on Gentoo 11 using version 0.0.1.31

Bug #888641 reported by James Glenn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstack-guest-agents
Fix Released
Undecided
Johannes Erdfelt

Bug Description

When adding a new Private IP address:
2011-11-10 17:22:59,893 [INFO] Received command 'version' with argument: 'agent'
2011-11-10 17:22:59,894 [INFO] 'version' completed with code '0', message '0.0.1.31'
2011-11-10 17:22:59,895 [INFO] Agent started
2011-11-10 17:23:06,899 [INFO] Received command 'features' with argument: ''
2011-11-10 17:23:06,899 [INFO] 'features' completed with code '0', message 'kmsactivate,resetnetwork,version,keyinit,features,agentupdate,password,injectfile'
2011-11-10 17:24:56,959 [INFO] Received command 'resetnetwork' with argument: ''
2011-11-10 17:24:56,961 [INFO] writing /etc/hosts
2011-11-10 17:24:56,962 [INFO] writing /etc/conf.d/net
2011-11-10 17:24:56,962 [INFO] writing /etc/conf.d/hostname
2011-11-10 17:24:56,962 [INFO] writing /etc/resolv.conf
2011-11-10 17:25:58,516 [INFO] 'resetnetwork' completed with code '0', message ''
When adding a new Public IP address:
2011-11-10 17:26:22,531 [INFO] Received command 'resetnetwork' with argument: ''
2011-11-10 17:26:22,532 [INFO] skipping /etc/hosts (no changes)
2011-11-10 17:26:22,532 [INFO] writing /etc/conf.d/net
2011-11-10 17:26:22,533 [INFO] skipping /etc/conf.d/hostname (no changes)
2011-11-10 17:26:22,533 [INFO] skipping /etc/resolv.conf (no changes)
2011-11-10 17:26:28,135 [INFO] 'resetnetwork' completed with code '500', message 'Couldn't restart network eth1: 256'

At this point networking dies.

Revision history for this message
James Glenn (james-glenn) wrote :

Please let me know if I can provide more information.

Changed in openstack-guest-agents:
status: New → In Progress
assignee: nobody → Johannes Erdfelt (johannes.erdfelt)
Revision history for this message
Johannes Erdfelt (johannes.erdfelt) wrote :

Can you get me the output of the command '/etc/init.d/net.eth1 restart'?

I can reproduce a problem, particularly with ssh not stopping causing the restart to fail, but I want to make sure it's the same issue you're seeing.

Revision history for this message
James Glenn (james-glenn) wrote :

# /etc/init.d/net.eth0 restart
 * WARNING: net.eth0 is already stopping
# /etc/init.d/net.eth0 restart
 * Bringing down interface eth0
 * Bringing up interface eth0
 * 50.57.104.42
 [ ok ]
 * 50.57.104.42
 [ ok ]
 * Adding routes
 * default via 50.57.104.1
 [ ok ]
 # /etc/init.d/net.eth1 restart
 * Bringing down interface eth1
 * Bringing up interface eth1
 * 10.182.96.40 ... [ ok ]
 * 10.182.96.53 ... [ ok ]
 * Adding routes
 * 10.182.96.53 netmask 255.248.0.0 via 10.182.96.1 ...
RTNETLINK answers: Invalid argument [ !! ]
 * 10.182.96.53 netmask 255.255.192.0 via 10.182.96.1 ...
RTNETLINK answers: Invalid argument
# cat /etc/conf.d/net
# Automatically generated, do not edit
modules="ifconfig"

config_eth1="10.182.96.40 netmask 255.255.224.0
10.182.96.53 netmask 255.255.224.0"
routes_eth1="10.182.96.53 netmask 255.248.0.0 via 10.182.96.1
10.182.96.53 netmask 255.255.192.0 via 10.182.96.1"
config_eth0="50.57.104.42 netmask 255.255.255.0
50.57.104.55 netmask 255.255.255.0"
routes_eth0="default via 50.57.104.1"

Revision history for this message
James Glenn (james-glenn) wrote :

So, I added a public and then a private IP.

Revision history for this message
Johannes Erdfelt (johannes.erdfelt) wrote :

The routes being added are strange.

network: 10.182.96.53
netmask: 255.248.0.0
gateway: 10.182.96.1

network: 10.182.96.53
netmask: 255.255.192.0
gateway: 10.182.96.1

Those networks are invalid. Also odd is that "network" is the same IP as the eth1 interface.

Is there a way to get the original resetnetwork command as sent to the agent? It would help pinpoint if it's a nova-agent problem or a client problem.

Revision history for this message
James Glenn (james-glenn) wrote :

+------------------------------------+----------------------------------------------------------------------------------------------------------------------+
| sentmsg | ackmsg |
+------------------------------------+----------------------------------------------------------------------------------------------------------------------+
| {"name":"version","value":"agent"} | {"message": "0.0.1.31", "returncode": "0"}
                                                                          |
| {"name":"features","value":""} | {"message": "kmsactivate,resetnetwork,version,keyinit,features,agentupdate,password,injectfile", "returncode": "0"}
 |
| {"name":"resetnetwork","value":""} | {"message": "", "returncode": "0"}
                                                                                  |
| {"name":"resetnetwork","value":""} | {"message": "", "returncode": "0"}
                                                                                  |
+------------------------------------+----------------------------------------------------------------------------------------------------------------------+

Revision history for this message
Johannes Erdfelt (johannes.erdfelt) wrote :

Can you try http://johannes.erdfelt.com/nova-agent-Linux-x86_64-0.0.1.32.tar.gz ? This should be fixed in this version.

Chris Behrens (cbehrens)
Changed in openstack-guest-agents:
status: In Progress → Fix Committed
Changed in openstack-guest-agents:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.