← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1314677] Re: nova-cells fails when using JSON file to store cell information

 

This bug was fixed in the package nova - 1:2014.1.3-0ubuntu1

---------------
nova (1:2014.1.3-0ubuntu1) trusty; urgency=medium

  [ Liam Young ]
  * d/p/cells-json-store.patch: Fix issue with nova-cells failing when using
    JSON file to store cell information (LP: #1314677).

  [ Corey Bryant ]
  * Resynchronize with stable/icehouse (a058646) (LP: #1377136):
    - [1a95c95] Adds tests for Hyper-V VM Utils
    - [bb47d55] Removes unnecessary instructions in test_hypervapi
    - [4f41d37] Fixes a Hyper-V list_instances localization issue
    - [9015410] Adds list_instance_uuids to the Hyper-V driver
    - [3371ad8] Add _wrap_db_error() support to Session.commit()
    - [dfb0e0f] Neutron: Atomic update of instance info cache
    - [bce481c] Ensure info cache updates don't overwhelm cells
    - [f58d95c] Sync process and str utils from oslo
    - [4e6371b] remove test_multiprocess_api
    - [7e09173] Fixes Hyper-V agent force_hyperv_utils_v1 flag issue
    - [7523ab4] Fix attaching config drive issue on Hyper-V when migrate instances
    - [74e0ba7] Fix live-migration failure in FC multipath case
    - [b61aa4d] libvirt: Save device_path in connection_info when booting from volume
    - [f93b8ee] Made unassigned networks visible in flat networking
    - [82cc3be] Do not fail cell's instance deletion, if it's missing info_cache
    - [d72c0a4] Fixes Hyper-V boot from volume root device issue
    - [0d3dad7] Fixes Hyper-V resize down exception
    - [5d5970a] db: Add @_retry_on_deadlock to service_update()
    - [9596f52] Add Hyper-V driver in the "compute_driver" option description
    - [4a8d6ca] Block sqlalchemy migrate 0.9.2 as it breaks all of nova
    - [311ab57] Move the error check for "brctl addif"
    - [df09c2a] Fix rootwrap for non openstack.org iqn's
    - [1613cd99] Fix instance boot when Ceph is used for ephemeral storage
    - [4bc680f] Make floatingip-ip-delete atomic with neutron
    - [0d69163] Fix race condition with vif plugging in finish migrate
    - [520aa4c] libvirt: Use VIR_DOMAIN_AFFECT_LIVE for paused instances
    - [3c34e37] add repr for event objects
    - [1b7ab22] make lifecycle event logs more clear
    - [e1d6e18] Catch missing Glance image attrs with None
    - [b591389] Update block_device_info to contain swap and ephemeral disks
    - [2155188] Adds get_instance_disk_info to compute drivers
    - [87f842d] Fixes Hyper-V vm state issue
    - [1106ef2] Fix expected error details from jsonschema
    - [e5e6bc7] Include next link when default limit is reached
    - [526853e] Fix FloatingIP.save() passing FixedIP object to sqlalchemy
    - [4e1e217] Read deleted instances during lifecycle events
    - [d8b9ba5] Add a retry_on_deadlock to reservations_expire
    - [b53adea] Add expire reservations in backport position.
    - [e874ee2] Fixes Hyper-V SCSI slot selection
    - [471e644] VMware: do not cache image when root_gb is 0
    - [825cfe4] Fix _parse_datetime in simple tenant usage extension
    - [073ee06] Avoid traceback logs from simple tenant usage extension
    - [9447203] replace NovaException with VirtualInterfaceCreate when neutron fails
    - [6b7cb1a] libvirt: convert cpu features attribute from list to a set
    - [7ca83e8] Delete image when backup operation failed on snapshot step
    - [82a13b3] VM in rescue state must have a restricted set of actions
    - [e7d2087] shelve doesn't work on nova-cells environment
    - [aeb71a8] libvirt: return the correct instance path while cleanup_resize
    - [cce6d22] Fix nova image-show with queued image
    - [aff80d5] _translate_from_glance() can cause an unnecessary HTTP request
    - [a058646] Loosen import_exceptions to cover all of gettextutils
  * d/p/libvirt-convert-cpu-features-attribute-from-list-to-.patch: Dropped.
    Code has been fixed upstream.
  * d/p/libvirt-Handle-unsupported-host-capabilities.patch: Rebased.
 -- Chuck Short <zulcss@xxxxxxxxxx>   Mon, 06 Oct 2014 09:24:45 -0400

** Changed in: nova (Ubuntu Trusty)
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1314677

Title:
  nova-cells fails when using JSON file to store cell information

Status in OpenStack Compute (Nova):
  Fix Released
Status in “nova” package in Ubuntu:
  Fix Released
Status in “nova” source package in Trusty:
  Fix Released

Bug description:
  As recommended in http://docs.openstack.org/havana/config-
  reference/content/section_compute-cells.html#cell-config-optional-json
  I'm creating the nova-cells config with the cell information stored in
  a json file. However, when I do this nova-cells fails to start with
  this error in the logs:

  2014-04-29 11:52:05.240 16759 CRITICAL nova [-] __init__() takes exactly 3 arguments (1 given)
  2014-04-29 11:52:05.240 16759 TRACE nova Traceback (most recent call last):
  2014-04-29 11:52:05.240 16759 TRACE nova   File "/usr/bin/nova-cells", line 10, in <module>
  2014-04-29 11:52:05.240 16759 TRACE nova     sys.exit(main())
  2014-04-29 11:52:05.240 16759 TRACE nova   File "/usr/lib/python2.7/dist-packages/nova/cmd/cells.py", line 40, in main
  2014-04-29 11:52:05.240 16759 TRACE nova     manager=CONF.cells.manager)
  2014-04-29 11:52:05.240 16759 TRACE nova   File "/usr/lib/python2.7/dist-packages/nova/service.py", line 257, in create
  2014-04-29 11:52:05.240 16759 TRACE nova     db_allowed=db_allowed)
  2014-04-29 11:52:05.240 16759 TRACE nova   File "/usr/lib/python2.7/dist-packages/nova/service.py", line 139, in __init__
  2014-04-29 11:52:05.240 16759 TRACE nova     self.manager = manager_class(host=self.host, *args, **kwargs)
  2014-04-29 11:52:05.240 16759 TRACE nova   File "/usr/lib/python2.7/dist-packages/nova/cells/manager.py", line 87, in __init__
  2014-04-29 11:52:05.240 16759 TRACE nova     self.state_manager = cell_state_manager()
  2014-04-29 11:52:05.240 16759 TRACE nova TypeError: __init__() takes exactly 3 arguments (1 given)

  
  I have had a dig into the code and it appears that CellsManager creates an instance of CellStateManager with no arguments. CellStateManager __new__ runs and creates an instance of CellStateManagerFile which runs __new__ and __init__ with cell_state_cls and cells_config_path set. At this point __new__ returns CellStateManagerFile and the new instance's __init__() method is invoked (CellStateManagerFile.__init__) with the original arguments (there weren't any) which then results in the stack trace.

  It seems reasonable for CellStateManagerFile to derive the
  cells_config_path info for itself so I've patched it locally with

  === modified file 'state.py'
  --- state.py	2014-04-30 15:10:16 +0000
  +++ state.py	2014-04-30 15:10:26 +0000
  @@ -155,7 +155,7 @@
               config_path = CONF.find_file(cells_config)
               if not config_path:
                   raise cfg.ConfigFilesNotFoundError(config_files=[cells_config])
  -            return CellStateManagerFile(cell_state_cls, config_path)
  +            return CellStateManagerFile(cell_state_cls)
   
           return CellStateManagerDB(cell_state_cls)
   
  @@ -450,7 +450,9 @@
   
   
   class CellStateManagerFile(CellStateManager):
  -    def __init__(self, cell_state_cls, cells_config_path):
  +    def __init__(self, cell_state_cls=None):
  +        cells_config = CONF.cells.cells_config
  +        cells_config_path = CONF.find_file(cells_config)
           self.cells_config_path = cells_config_path
           super(CellStateManagerFile, self).__init__(cell_state_cls)
   

  
  Ubuntu: 14.04
  nova-cells: 1:2014.1-0ubuntu1

  nova.conf:

  [DEFAULT]
  dhcpbridge_flagfile=/etc/nova/nova.conf
  dhcpbridge=/usr/bin/nova-dhcpbridge
  logdir=/var/log/nova
  state_path=/var/lib/nova
  lock_path=/var/lock/nova
  force_dhcp_release=True
  iscsi_helper=tgtadm
  libvirt_use_virtio_for_bridges=True
  connection_type=libvirt
  root_helper=sudo nova-rootwrap /etc/nova/rootwrap.conf
  verbose=True
  ec2_private_dns_show_ip=True
  api_paste_config=/etc/nova/api-paste.ini
  volumes_path=/var/lib/nova/volumes
  enabled_apis=ec2,osapi_compute,metadata
  auth_strategy=keystone
  compute_driver=libvirt.LibvirtDriver
  quota_driver=nova.quota.NoopQuotaDriver

  
  [cells]
  enable=True
  name=cell
  cell_type=compute
  cells_config=/etc/nova/cells.json

  
  cells.json: 
  {
      "parent": {
          "name": "parent",
          "api_url": "http://api.example.com:8774";,
          "transport_url": "rabbit://rabbit.example.com",
          "weight_offset": 0.0,
          "weight_scale": 1.0,
          "is_parent": true
      }
  }

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1314677/+subscriptions


References