ConfigDrive datasource "check_instance_id()" argments fault

Bug #1580455 reported by Naoto Gohko on 2016-05-11
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init (Ubuntu)
Undecided
Unassigned

Bug Description

on Ubuntu 16.04 environment.

I use cloud-init 0.7.7~bzr1212-0ubuntu1.

I use ConfigDrive datasource by OpenStack.

I find a bug on datasource driver overwrite method: "def check_instance_id(self, sys_cfg)"

__init__.py is def check_instance_id(self, sys_cfg)

but
DataSourceConfigDrive.py is def check_instance_id(self)

This format will raise the argment error in python3.

Before:(ConfigDrive is Error)
root@new-conoha:/var/lib/cloud/data# grep -r check_instance_id /usr/lib/python3/dist-packages/cloudinit/sources/*.py
/usr/lib/python3/dist-packages/cloudinit/sources/DataSourceAzure.py: def check_instance_id(self, sys_cfg):
/usr/lib/python3/dist-packages/cloudinit/sources/DataSourceConfigDrive.py: def check_instance_id(self):
/usr/lib/python3/dist-packages/cloudinit/sources/DataSourceNoCloud.py: def check_instance_id(self, sys_cfg):
/usr/lib/python3/dist-packages/cloudinit/sources/DataSourceOpenStack.py: def check_instance_id(self, sys_cfg):
/usr/lib/python3/dist-packages/cloudinit/sources/__init__.py: def check_instance_id(self, sys_cfg):

I have rewritten as follows.

After:(ConfigDrive was Done)
root@new-conoha:/var/lib/cloud/data# grep -r check_instance_id /usr/lib/python3/dist-packages/cloudinit/sources/*.py
/usr/lib/python3/dist-packages/cloudinit/sources/DataSourceAzure.py: def check_instance_id(self, sys_cfg):
/usr/lib/python3/dist-packages/cloudinit/sources/DataSourceConfigDrive.py: def check_instance_id(self, sys_cfg):
/usr/lib/python3/dist-packages/cloudinit/sources/DataSourceNoCloud.py: def check_instance_id(self, sys_cfg):
/usr/lib/python3/dist-packages/cloudinit/sources/DataSourceOpenStack.py: def check_instance_id(self, sys_cfg):
/usr/lib/python3/dist-packages/cloudinit/sources/__init__.py: def check_instance_id(self, sys_cfg):

Naoto Gohko (chroum) wrote :

The attachment "DataSourceConfigDrive-argment.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers