Menu

#4024 nova [-] __init__() takes at least 2 arguments (1 given) - openstack-nova-compute failed to start up

2.8.4
pending
Ling
general
5
2015-02-25
2014-03-17
GONG Jie
No

This is openstack baremetal related problem. Please refer to xCAT bug #4023 first.
https://sourceforge.net/p/xcat/bugs/4023/

The testing environment is RHEL6.4 on x86-64. The following rpm packages were installed and used.

[root@dx360m4n05 ~]# rpm -qa | grep -i xcat
perl-xCAT-2.8.4-snap201403130854.noarch
xCAT-OpenStack-baremetal-2.8.4-snap201403130855.noarch
xCAT-server-2.8.4-snap201403130854.noarch
xCAT-client-2.8.4-snap201403130854.noarch

[root@dx360m4n05 ~]# rpm -qa | grep -i openstack | sort
kernel-2.6.32-358.123.2.openstack.el6.x86_64
kernel-firmware-2.6.32-358.123.2.openstack.el6.noarch
openstack-glance-2013.2.2-2.el6.noarch
openstack-keystone-2013.2.2-1.el6.noarch
openstack-nova-2013.2.2-1.el6.noarch
openstack-nova-api-2013.2.2-1.el6.noarch
openstack-nova-cells-2013.2.2-1.el6.noarch
openstack-nova-cert-2013.2.2-1.el6.noarch
openstack-nova-common-2013.2.2-1.el6.noarch
openstack-nova-compute-2013.2.2-1.el6.noarch
openstack-nova-conductor-2013.2.2-1.el6.noarch
openstack-nova-console-2013.2.2-1.el6.noarch
openstack-nova-network-2013.2.2-1.el6.noarch
openstack-nova-novncproxy-2013.2.2-1.el6.noarch
openstack-nova-objectstore-2013.2.2-1.el6.noarch
openstack-nova-scheduler-2013.2.2-1.el6.noarch
openstack-packstack-2013.2.1-0.32.dev987.el6.noarch
openstack-selinux-0.1.3-2.el6ost.noarch
openstack-utils-2013.2-2.el6.noarch
perf-2.6.32-358.123.2.openstack.el6.x86_64
xCAT-OpenStack-baremetal-2.8.4-snap201403130855.noarch

This is the nova configuration file

[root@dx360m4n05 ~]# cat /etc/nova/nova.conf | grep -v ^# | grep -v ^$
[DEFAULT]
reserved_host_memory_mb=0
scheduler_host_manager=nova.scheduler.baremetal_host_manager.BaremetalHostManager
ram_allocation_ratio=1.0
compute_driver=xcat.openstack.baremetal.driver.xCATBareMetalDriver
my_ip = 9.114.34.243
vncserver_listen = 9.114.34.243
vncserver_proxyclient_address = 9.114.34.243
auth_strategy = keystone
rpc_backend = nova.openstack.common.rpc.impl_qpid
qpid_hostname = dx360m4n05
[hyperv]
[zookeeper]
[osapi_v3]
[conductor]
[keymgr]
[cells]
[database]
connection = mysql://nova:cluster@dx360m4n05/nova
[image_file_url]
[baremetal]
sql_connection=mysql://root:cluster@localhost/nova_bm?charset=utf8
instance_type_extra_specs=cpu_arch:x86_64
tftp_root=/tftpboot
[rpc_notifier2]
[matchmaker_redis]
[ssl]
[trusted_computing]
[upgrade_levels]
[matchmaker_ring]
[vmware]
[spice]
[keystone_authtoken]
auth_uri = http://dx360m4n05:5000
auth_host = dx360m4n05
auth_protocol = http
auth_port = 35357
admin_user = nova
admin_tenant_name = service
admin_password = cluster
[xcat]
deploy_timeout=0
deploy_checking_interval=10
reboot_timeout=0
reboot_checking_interval=5

After apply the quick-and-dirty fixing for the indent problem. There is still another problem.
https://sourceforge.net/p/xcat/bugs/4023/attachment/openstack-baremetal-driver.py.patch

The openstack-nova-compute service still can not start up. Please refer to the following log messages.

[root@dx360m4n05 ~]# tail /var/log/nova/compute.log
2014-03-17 12:57:15.913 18325 CRITICAL nova [-] unexpected indent (driver.py, line 171)
2014-03-17 12:57:22.147 18340 CRITICAL nova [-] unexpected indent (driver.py, line 171)
2014-03-17 12:57:35.070 18479 CRITICAL nova [-] unexpected indent (driver.py, line 171)
2014-03-17 12:58:13.955 18715 CRITICAL nova [-] unexpected indent (driver.py, line 171)
2014-03-17 13:07:34.592 18867 CRITICAL nova [-] __init__() takes at least 2 arguments (1 given)
2014-03-17 13:07:36.828 18881 CRITICAL nova [-] __init__() takes at least 2 arguments (1 given)
2014-03-17 13:07:56.815 18908 CRITICAL nova [-] __init__() takes at least 2 arguments (1 given)
2014-03-17 13:08:05.569 18923 CRITICAL nova [-] __init__() takes at least 2 arguments (1 given)
2014-03-17 13:12:38.591 18990 CRITICAL nova [-] __init__() takes at least 2 arguments (1 given)
2014-03-17 13:27:15.746 19163 CRITICAL nova [-] __init__() takes at least 2 arguments (1 given)

Discussion

  • GONG Jie

    GONG Jie - 2014-03-17
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -84,6 +84,8 @@
     After apply the quick-and-dirty fixing for the indent problem. There is still another problem.
     https://sourceforge.net/p/xcat/bugs/4023/attachment/openstack-baremetal-driver.py.patch
    
    +The openstack-nova-compute service still can not start up. Please refer to the following log messages.
    +
     [root@dx360m4n05 ~]# tail /var/log/nova/compute.log
     2014-03-17 12:57:15.913 18325 CRITICAL nova [-] unexpected indent (driver.py, line 171)
     2014-03-17 12:57:22.147 18340 CRITICAL nova [-] unexpected indent (driver.py, line 171)
    
     
  • GONG Jie

    GONG Jie - 2014-03-17
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -3,97 +3,97 @@
    
     The testing environment is RHEL6.4 on x86-64. The following rpm packages were installed and used.
    
    -[root@dx360m4n05 ~]# rpm -qa | grep -i xcat
    -perl-xCAT-2.8.4-snap201403130854.noarch
    -xCAT-OpenStack-baremetal-2.8.4-snap201403130855.noarch
    -xCAT-server-2.8.4-snap201403130854.noarch
    -xCAT-client-2.8.4-snap201403130854.noarch
    +    [root@dx360m4n05 ~]# rpm -qa | grep -i xcat
    +    perl-xCAT-2.8.4-snap201403130854.noarch
    +    xCAT-OpenStack-baremetal-2.8.4-snap201403130855.noarch
    +    xCAT-server-2.8.4-snap201403130854.noarch
    +    xCAT-client-2.8.4-snap201403130854.noarch
    
    -[root@dx360m4n05 ~]# rpm -qa | grep -i openstack | sort
    -kernel-2.6.32-358.123.2.openstack.el6.x86_64
    -kernel-firmware-2.6.32-358.123.2.openstack.el6.noarch
    -openstack-glance-2013.2.2-2.el6.noarch
    -openstack-keystone-2013.2.2-1.el6.noarch
    -openstack-nova-2013.2.2-1.el6.noarch
    -openstack-nova-api-2013.2.2-1.el6.noarch
    -openstack-nova-cells-2013.2.2-1.el6.noarch
    -openstack-nova-cert-2013.2.2-1.el6.noarch
    -openstack-nova-common-2013.2.2-1.el6.noarch
    -openstack-nova-compute-2013.2.2-1.el6.noarch
    -openstack-nova-conductor-2013.2.2-1.el6.noarch
    -openstack-nova-console-2013.2.2-1.el6.noarch
    -openstack-nova-network-2013.2.2-1.el6.noarch
    -openstack-nova-novncproxy-2013.2.2-1.el6.noarch
    -openstack-nova-objectstore-2013.2.2-1.el6.noarch
    -openstack-nova-scheduler-2013.2.2-1.el6.noarch
    -openstack-packstack-2013.2.1-0.32.dev987.el6.noarch
    -openstack-selinux-0.1.3-2.el6ost.noarch
    -openstack-utils-2013.2-2.el6.noarch
    -perf-2.6.32-358.123.2.openstack.el6.x86_64
    -xCAT-OpenStack-baremetal-2.8.4-snap201403130855.noarch
    +    [root@dx360m4n05 ~]# rpm -qa | grep -i openstack | sort
    +    kernel-2.6.32-358.123.2.openstack.el6.x86_64
    +    kernel-firmware-2.6.32-358.123.2.openstack.el6.noarch
    +    openstack-glance-2013.2.2-2.el6.noarch
    +    openstack-keystone-2013.2.2-1.el6.noarch
    +    openstack-nova-2013.2.2-1.el6.noarch
    +    openstack-nova-api-2013.2.2-1.el6.noarch
    +    openstack-nova-cells-2013.2.2-1.el6.noarch
    +    openstack-nova-cert-2013.2.2-1.el6.noarch
    +    openstack-nova-common-2013.2.2-1.el6.noarch
    +    openstack-nova-compute-2013.2.2-1.el6.noarch
    +    openstack-nova-conductor-2013.2.2-1.el6.noarch
    +    openstack-nova-console-2013.2.2-1.el6.noarch
    +    openstack-nova-network-2013.2.2-1.el6.noarch
    +    openstack-nova-novncproxy-2013.2.2-1.el6.noarch
    +    openstack-nova-objectstore-2013.2.2-1.el6.noarch
    +    openstack-nova-scheduler-2013.2.2-1.el6.noarch
    +    openstack-packstack-2013.2.1-0.32.dev987.el6.noarch
    +    openstack-selinux-0.1.3-2.el6ost.noarch
    +    openstack-utils-2013.2-2.el6.noarch
    +    perf-2.6.32-358.123.2.openstack.el6.x86_64
    +    xCAT-OpenStack-baremetal-2.8.4-snap201403130855.noarch
    
     This is the nova configuration file
    
    -[root@dx360m4n05 ~]# cat /etc/nova/nova.conf | grep -v ^# | grep -v ^$
    -[DEFAULT]
    -reserved_host_memory_mb=0
    -scheduler_host_manager=nova.scheduler.baremetal_host_manager.BaremetalHostManager
    -ram_allocation_ratio=1.0
    -compute_driver=xcat.openstack.baremetal.driver.xCATBareMetalDriver
    -my_ip = 9.114.34.243
    -vncserver_listen = 9.114.34.243
    -vncserver_proxyclient_address = 9.114.34.243
    -auth_strategy = keystone
    -rpc_backend = nova.openstack.common.rpc.impl_qpid
    -qpid_hostname = dx360m4n05
    -[hyperv]
    -[zookeeper]
    -[osapi_v3]
    -[conductor]
    -[keymgr]
    -[cells]
    -[database]
    -connection = mysql://nova:cluster@dx360m4n05/nova
    -[image_file_url]
    -[baremetal]
    -sql_connection=mysql://root:cluster@localhost/nova_bm?charset=utf8
    -instance_type_extra_specs=cpu_arch:x86_64
    -tftp_root=/tftpboot
    -[rpc_notifier2]
    -[matchmaker_redis]
    -[ssl]
    -[trusted_computing]
    -[upgrade_levels]
    -[matchmaker_ring]
    -[vmware]
    -[spice]
    -[keystone_authtoken]
    -auth_uri = http://dx360m4n05:5000
    -auth_host = dx360m4n05
    -auth_protocol = http
    -auth_port = 35357
    -admin_user = nova
    -admin_tenant_name = service
    -admin_password = cluster
    -[xcat]
    -deploy_timeout=0
    -deploy_checking_interval=10
    -reboot_timeout=0
    -reboot_checking_interval=5
    +    [root@dx360m4n05 ~]# cat /etc/nova/nova.conf | grep -v ^# | grep -v ^$
    +    [DEFAULT]
    +    reserved_host_memory_mb=0
    +    scheduler_host_manager=nova.scheduler.baremetal_host_manager.BaremetalHostManager
    +    ram_allocation_ratio=1.0
    +    compute_driver=xcat.openstack.baremetal.driver.xCATBareMetalDriver
    +    my_ip = 9.114.34.243
    +    vncserver_listen = 9.114.34.243
    +    vncserver_proxyclient_address = 9.114.34.243
    +    auth_strategy = keystone
    +    rpc_backend = nova.openstack.common.rpc.impl_qpid
    +    qpid_hostname = dx360m4n05
    +    [hyperv]
    +    [zookeeper]
    +    [osapi_v3]
    +    [conductor]
    +    [keymgr]
    +    [cells]
    +    [database]
    +    connection = mysql://nova:cluster@dx360m4n05/nova
    +    [image_file_url]
    +    [baremetal]
    +    sql_connection=mysql://root:cluster@localhost/nova_bm?charset=utf8
    +    instance_type_extra_specs=cpu_arch:x86_64
    +    tftp_root=/tftpboot
    +    [rpc_notifier2]
    +    [matchmaker_redis]
    +    [ssl]
    +    [trusted_computing]
    +    [upgrade_levels]
    +    [matchmaker_ring]
    +    [vmware]
    +    [spice]
    +    [keystone_authtoken]
    +    auth_uri = http://dx360m4n05:5000
    +    auth_host = dx360m4n05
    +    auth_protocol = http
    +    auth_port = 35357
    +    admin_user = nova
    +    admin_tenant_name = service
    +    admin_password = cluster
    +    [xcat]
    +    deploy_timeout=0
    +    deploy_checking_interval=10
    +    reboot_timeout=0
    +    reboot_checking_interval=5
    
     After apply the quick-and-dirty fixing for the indent problem. There is still another problem.
     https://sourceforge.net/p/xcat/bugs/4023/attachment/openstack-baremetal-driver.py.patch
    
     The openstack-nova-compute service still can not start up. Please refer to the following log messages.
    
    -[root@dx360m4n05 ~]# tail /var/log/nova/compute.log
    -2014-03-17 12:57:15.913 18325 CRITICAL nova [-] unexpected indent (driver.py, line 171)
    -2014-03-17 12:57:22.147 18340 CRITICAL nova [-] unexpected indent (driver.py, line 171)
    -2014-03-17 12:57:35.070 18479 CRITICAL nova [-] unexpected indent (driver.py, line 171)
    -2014-03-17 12:58:13.955 18715 CRITICAL nova [-] unexpected indent (driver.py, line 171)
    -2014-03-17 13:07:34.592 18867 CRITICAL nova [-] __init__() takes at least 2 arguments (1 given)
    -2014-03-17 13:07:36.828 18881 CRITICAL nova [-] __init__() takes at least 2 arguments (1 given)
    -2014-03-17 13:07:56.815 18908 CRITICAL nova [-] __init__() takes at least 2 arguments (1 given)
    -2014-03-17 13:08:05.569 18923 CRITICAL nova [-] __init__() takes at least 2 arguments (1 given)
    -2014-03-17 13:12:38.591 18990 CRITICAL nova [-] __init__() takes at least 2 arguments (1 given)
    -2014-03-17 13:27:15.746 19163 CRITICAL nova [-] __init__() takes at least 2 arguments (1 given)
    +    [root@dx360m4n05 ~]# tail /var/log/nova/compute.log
    +    2014-03-17 12:57:15.913 18325 CRITICAL nova [-] unexpected indent (driver.py, line 171)
    +    2014-03-17 12:57:22.147 18340 CRITICAL nova [-] unexpected indent (driver.py, line 171)
    +    2014-03-17 12:57:35.070 18479 CRITICAL nova [-] unexpected indent (driver.py, line 171)
    +    2014-03-17 12:58:13.955 18715 CRITICAL nova [-] unexpected indent (driver.py, line 171)
    +    2014-03-17 13:07:34.592 18867 CRITICAL nova [-] __init__() takes at least 2 arguments (1 given)
    +    2014-03-17 13:07:36.828 18881 CRITICAL nova [-] __init__() takes at least 2 arguments (1 given)
    +    2014-03-17 13:07:56.815 18908 CRITICAL nova [-] __init__() takes at least 2 arguments (1 given)
    +    2014-03-17 13:08:05.569 18923 CRITICAL nova [-] __init__() takes at least 2 arguments (1 given)
    +    2014-03-17 13:12:38.591 18990 CRITICAL nova [-] __init__() takes at least 2 arguments (1 given)
    +    2014-03-17 13:27:15.746 19163 CRITICAL nova [-] __init__() takes at least 2 arguments (1 given)
    
     
  • Ling

    Ling - 2014-03-17

    This is very interesting, I have compared the files with my machine. Files under these 3 directories are identical:
    nova/virt
    nova/virt/baremetal
    /opt/xcat/lib/python/xcat/openstack/baremetal

    Both machines have python 2.6.6.
    Why does one complain and the other does not?

    The trace file looks like this:

    INFO nova.virt.driver [-] Loading compute driver 'xcat.openstack.baremetal.driver.xCATBareMetalDriver'
    CRITICAL nova [-] init() takes at least 2 arguments (1 given)
    TRACE nova Traceback (most recent call last):
    TRACE nova File "/usr/bin/nova-compute", line 11, in <module>
    TRACE nova sys.exit(main())
    TRACE nova File "/usr/lib/python2.6/site-packages/nova/cmd/compute.py", line 68, in main
    TRACE nova db_allowed=False)
    TRACE nova File "/usr/lib/python2.6/site-packages/nova/service.py", line 257, in create
    TRACE nova db_allowed=db_allowed)
    TRACE nova File "/usr/lib/python2.6/site-packages/nova/service.py", line 139, in init
    TRACE nova self.manager = manager_class(host=self.host, args, kwargs)
    TRACE nova File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 450, in init
    TRACE nova self.driver = driver.load_compute_driver(self.virtapi, compute_driver)
    TRACE nova File "/usr/lib/python2.6/site-packages/nova/virt/driver.py", line 1115, in load_compute_driver
    TRACE nova virtapi)
    TRACE nova File "/usr/lib/python2.6/site-packages/nova/openstack/common/importutils.py", line 54, in import_object_ns
    TRACE nova return import_class(import_str)(
    args, kwargs)
    TRACE nova File "/opt/xcat/lib/python/xcat/openstack/baremetal/driver.py", line 39, in init
    TRACE nova super(xCATBareMetalDriver, self).init(virtapi)
    TRACE nova File "/usr/lib/python2.6/site-packages/nova/virt/baremetal/driver.py", line 124, in init
    TRACE nova default=DEFAULT_FIREWALL_DRIVER)
    TRACE nova File "/usr/lib/python2.6/site-packages/nova/virt/firewall.py", line 49, in load_driver
    TRACE nova return fw_class(*args,
    kwargs)
    TRACE nova TypeError: init() takes at least 2 arguments (1 given)
    TRACE nova</module>

     

    Last edit: Ling 2014-03-17
  • Ling

    Ling - 2014-03-18

    The nova/virt/firewall.py has the following code to load the firewall driver:

    def load_driver(default, *args, **kwargs):
    fw_class = importutils.import_class(CONF.firewall_driver or default)
    return fw_class(*args, **kwargs)

    Some how on your cloud, the value of CONF.firewall_driver is nova.virt.libvirt.firewall.IptablesFirewallDriver even if I commented it out in /etc/nova/nova.conf.

    On my cloud it is None.

    So the solution is manually set
    firewall_driver=nova.virt.firewall.NoopFirewallDriver
    in /etc/nova/nova.conf.

    I have also updated this doc: https://sourceforge.net/apps/mediawiki/xcat/index.php?title=Using_xCAT_in_OpenStack_Baremetal_Node_Deployment

     
  • Ling

    Ling - 2014-03-18
    • status: open --> pending
     
MongoDB Logo MongoDB