Crash on startup with "ValueError: IP sequence must contain at least 2 elements" when dynamic range is incorrect

Bug #1498262 reported by Nguyen Anh Tuan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Won't Fix
Critical
Unassigned

Bug Description

Contenet of /var/log/maas/regiond.log

2015-09-21 22:22:03 [maasserver.start_up] ERROR: Error during start-up.
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/maasserver/start_up.py", line 84, in start_up
    yield deferToThread(inner_start_up)
ValueError: IP sequence must contain at least 2 elements!
2015-09-21 22:22:04 [HTTPChannel,0,127.0.0.1] 127.0.0.1 - - [22/Sep/2015:02:22:04 +0000] "GET /MAAS/rpc/ HTTP/1.1" 503 164 "-" "provisioningserver.rpc.clusterservice.ClusterClientService"
2015-09-21 22:22:06 [maasserver.start_up] ERROR: Error during start-up.
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/maasserver/start_up.py", line 84, in start_up
    yield deferToThread(inner_start_up)
ValueError: IP sequence must contain at least 2 elements!
2015-09-21 22:22:06 [HTTPChannel,0,127.0.0.1] 127.0.0.1 - - [22/Sep/2015:02:22:06 +0000] "GET /MAAS/rpc/ HTTP/1.1" 503 164 "-" "provisioningserver.rpc.clusterservice.ClusterClientService"
2015-09-21 22:22:08 [HTTPChannel,0,127.0.0.1] 127.0.0.1 - - [22/Sep/2015:02:22:08 +0000] "GET /MAAS/rpc/ HTTP/1.1" 503 164 "-" "provisioningserver.rpc.clusterservice.ClusterClientService"
2015-09-21 22:22:09 [maasserver.start_up] ERROR: Error during start-up.
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/maasserver/start_up.py", line 84, in start_up
    yield deferToThread(inner_start_up)
ValueError: IP sequence must contain at least 2 elements!
2015-09-21 22:22:10 [HTTPChannel,0,127.0.0.1] 127.0.0.1 - - [22/Sep/2015:02:22:10 +0000] "GET /MAAS/rpc/ HTTP/1.1" 503 164 "-" "provisioningserver.rpc.clusterservice.ClusterClientService"
2015-09-21 22:22:12 [HTTPChannel,0,127.0.0.1] 127.0.0.1 - - [22/Sep/2015:02:22:12 +0000] "GET /MAAS/rpc/ HTTP/1.1" 503 164 "-" "provisioningserver.rpc.clusterservice.ClusterClientService"
2015-09-21 22:22:12 [maasserver.start_up] ERROR: Error during start-up.
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/maasserver/start_up.py", line 84, in start_up
    yield deferToThread(inner_start_up)
ValueError: IP sequence must contain at least 2 elements!
2015-09-21 22:22:14 [HTTPChannel,0,127.0.0.1] 127.0.0.1 - - [22/Sep/2015:02:22:14 +0000] "GET /MAAS/rpc/ HTTP/1.1" 503 164 "-" "provisioningserver.rpc.clusterservice.ClusterClientService"
2015-09-21 22:22:15 [maasserver.start_up] ERROR: Error during start-up.
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/maasserver/start_up.py", line 84, in start_up
    yield deferToThread(inner_start_up)
ValueError: IP sequence must contain at least 2 elements!
2015-09-21 22:22:16 [HTTPChannel,0,127.0.0.1] 127.0.0.1 - - [22/Sep/2015:02:22:16 +0000] "GET /MAAS/rpc/ HTTP/1.1" 503 164 "-" "provisioningserver.rpc.clusterservice.ClusterClientService"
2015-09-21 22:22:18 [HTTPChannel,1,127.0.0.1] 127.0.0.1 - - [22/Sep/2015:02:22:18 +0000] "GET /MAAS/rpc/ HTTP/1.1" 503 164 "-" "provisioningserver.rpc.clusterservice.ClusterClientService"
2015-09-21 22:22:18 [maasserver.start_up] ERROR: Error during start-up.
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/maasserver/start_up.py", line 84, in start_up
    yield deferToThread(inner_start_up)
ValueError: IP sequence must contain at least 2 elements!

Revision history for this message
Nguyen Anh Tuan (kevin-nguyen-eng) wrote :

I can't find relation between this to my configuration

I'also try

 $ sudo dpkg-reconfigure maas-region-controller
 $ sudo dpkg-reconfigure maas-cluster-controller
 $ sudo reboot

but erro still apear

2015-09-21 22:36:24 [maasserver.start_up] ERROR: Error during start-up.
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/maasserver/start_up.py", line 84, in start_up
    yield deferToThread(inner_start_up)
ValueError: IP sequence must contain at least 2 elements!
2015-09-21 22:36:25 [HTTPChannel,0,127.0.0.1] 127.0.0.1 - - [22/Sep/2015:02:36:25 +0000] "GET /MAAS/rpc/ HTTP/1.1" 503 164 "-" "provisioningserver.rpc.clusterservice.ClusterClientService"

Revision history for this message
Mike Pontillo (mpontillo) wrote :

Thank you for taking the time to report a bug in MAAS.

Before we can begin to troubleshoot the problem, could you please let us know the following information:

 - Which version of MAAS are you running? (apt-cache policy maas)
 - Which version of Ubuntu are you running? (lsb_release -a
 - Was this MAAS installation installed and configured already, or was it a new install?

I looked into the error that was thrown. The function spanning_cidr() netaddr.ip can throw this error. In the current trunk, we call this in get_details_for_ip_range() in zoneconfg.py (under provisioningserver.dns). This function is called when we generate forward and reverse DNS zones; the input to this function seems to be the dynamic ranges for each managed NodeGroupInterface.

Therefore, it would be helpful to run "sudo maas-region-admin dbshell" and then "select * from maasserver_nodegroupinterface;". This could tell us if it's possible that an invalid dynamic range is causing this problem.

Changed in maas:
status: New → Incomplete
Revision history for this message
Nguyen Anh Tuan (kevin-nguyen-eng) wrote :

Hello Mike

I send back information about this as below

 - Which version of MAAS are you running? (apt-cache policy maas)
maas:
  Installed: 1.8.0+bzr4001-0ubuntu2~trusty1
  Candidate: 1.8.0+bzr4001-0ubuntu2~trusty1
  Version table:
 *** 1.8.0+bzr4001-0ubuntu2~trusty1 0
        500 http://ppa.launchpad.net/maas-maintainers/stable/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status
     1.7.6+bzr3376-0ubuntu2~14.04.1 0
        500 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
     1.5.4+bzr2294-0ubuntu1.2 0
        500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
     1.5+bzr2252-0ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

 - Which version of Ubuntu are you running? (lsb_release -a)
            # lsb_release -a
  No LSB modules are available.
  Distributor ID: Ubuntu
  Description: Ubuntu 14.04.3 LTS
  Release: 14.04
  Codename: trusty
- Was this MAAS installation installed and configured already, or was it a new install?
            # This MAAS installation was installed and configured then running OK - but when using after change attribute in CLUSTER section , and after maintaince boot system maas cannot startup again and cause this error in log

I upload the db table maasserver_nodegroupinterface

/# sudo maas-region-admin dbshell
psql (9.3.9)
Type "help" for help.

maasdb=# select * from maasserver_nodegroupinterface;
 id | created | updated | ip | nodegroup_id | management | interface | subnet_mask | broadcast_ip | router_ip | ip_range_low | ip_range_high | foreign_dhcp_ip | static_ip_range_low | static_ip_range_high | name
----+-------------------------------+-------------------------------+---------------+--------------+------------+-----------+-----------------+---------------+---------------+---------------+---------------+-----------------+---------------------+----------------------+------
  2 | 2015-09-14 13:48:59.339395-04 | 2015-09-19 00:52:05.629086-04 | 42.116.255.36 | 1 | 2 | eth1 | 255.255.255.240 | 42.116.255.47 | 42.116.255.33 | 42.116.255.39 | 42.116.255.39 | | 42.116.255.40 | 42.116.255.45 | eth1
  1 | 2015-09-14 13:48:59.339395-04 | 2015-09-21 13:37:46.164694-04 | 172.27.6.232 | 1 | 1 | eth0 | 255.255.255.240 | 172.27.6.239 | 172.27.6.225 | 172.27.6.233 | 172.27.6.235 | | 172.27.6.237 | 172.27.6.238 | eth0
(2 rows)

Revision history for this message
Nguyen Anh Tuan (kevin-nguyen-eng) wrote :

Hello Mike

Thanks for your help , I have just fix this error because I input ip_range_low and ip_high_low the same 42.116.255.39

summary: - yield deferToThread(inner_start_up) cause ERROR
+ Crash on startup with "ValueError: IP sequence must contain at least 2
+ elements" when dynamic range is incorrect
Changed in maas:
status: Incomplete → Triaged
importance: Undecided → Critical
no longer affects: maas/1.8
Changed in maas:
status: Triaged → Won't Fix
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.