Bug #4882

Error when terminating a VM with more than ten interfaces.

Added by Marcel Weinberg over 2 years ago. Updated over 2 years ago.

Status:ClosedStart date:10/26/2016
Priority:NormalDue date:
Assignee:Marcel Weinberg% Done:

0%

Category:Drivers - Network
Target version:Release 5.2.1
Resolution:fixed Pull request:
Affected Versions:OpenNebula 5.2

Description

It's quite simple:

Whenever you terminate a VM with 10 or more interfaces, you will get the following error:

Wed Oct 26 18:39:44 2016 [Z0][VMM][I]: iptables: Too many links.
Wed Oct 26 18:39:44 2016 [Z0][VMM][E]: clean: Command Error: sudo iptables -X one-121-10-i
Wed Oct 26 18:39:44 2016 [Z0][VMM][E]: clean: ["/var/tmp/one/vnm/command.rb:61:in `block in run!'", "/var/tmp/one/vnm/command.rb:58:in `each'", "/var/tmp/one/vnm/command.rb:58:in `run!'", "/var/tmp/one/vnm/security_groups_iptables.rb:345:in `nic_deactivate'", "/var/tmp/one/vnm/sg_driver.rb:128:in `block in deactivate'", "/var/tmp/one/vnm/sg_driver.rb:125:in `each'", "/var/tmp/one/vnm/sg_driver.rb:125:in `deactivate'", "/var/tmp/one/vnm/802.1Q/clean:35:in `<main>'"]
Wed Oct 26 18:39:44 2016 [Z0][VMM][I]: ExitCode: 1
Wed Oct 26 18:39:44 2016 [Z0][VMM][I]: Failed to execute network driver operation: clean.
Wed Oct 26 18:39:44 2016 [Z0][VMM][E]: Error shutting down VM: 802.1Q: -
Wed Oct 26 18:39:44 2016 [Z0][VM][I]: New LCM state is RUNNING
Wed Oct 26 18:39:45 2016 [Z0][LCM][I]: Fail to shutdown VM. Assuming that the VM is still RUNNING (will poll VM).
Wed Oct 26 18:40:16 2016 [Z0][LCM][I]: VM running but monitor state is POWEROFF
Wed Oct 26 18:40:16 2016 [Z0][VM][I]: New LCM state is SHUTDOWN_POWEROFF
Wed Oct 26 18:40:17 2016 [Z0][VM][I]: New state is POWEROFF

The VM will be terminated anyway, BUT the iptables rules and chains remain on the system.

This is caused by a regex match that does not check the whole string.

Example:
if line.match(/^#{chain}/)

I will fork the repo and creaate a pull request with a fix.

History

#1 Updated by Marcel Weinberg over 2 years ago

Created pull request #132

#2 Updated by Marcel Weinberg over 2 years ago

Created pull request 132.

#3 Updated by Javi Fontan over 2 years ago

  • Status changed from Pending to Closed
  • Target version set to Release 5.4
  • Resolution set to fixed

Merged pull requests to both master and 5.2 branches

#4 Updated by Tino VĂ¡zquez over 2 years ago

  • Target version changed from Release 5.4 to Release 5.2.1

Also available in: Atom PDF