[Yahoo-eng-team] [Bug 1648324] [NEW] When cross_az_attach set to false and creating VM with bootable volumes created before, InvalidBDM error raised.

2016-12-07 Thread John Haan
Public bug reported:

Description
===

When cross_az_attach option is set to False and you try to boot an
instance with bootable volume created before, InvalidBDM error raised.

Steps to reproduce
==

1. Configure multiple AZs in Nova and Cinder.
  - for Nova : AZ1 and AZ2
  - for Cinder : AZ1 and AZ2

2. cross_az_attach set to false in nova.conf
[cinder]
cross_az_attach = False

3. Restart nova-compute service

4. Create volume from glance image
$ cinder create 10 --display-name test-bootable-volume --image-id {image-id} 
--availability-zone AZ1

5. Create instance from the volume created
$ nova boot --flavor m1.small --boot-volume 
7c15ae47-12bd-41e7-822d-37e3619082be --nic 
net-id=1493b02c-c257-45db-84ea-789f87ed7924 --availability-zone AZ1 
demo-instance

Expected result
===

Instance is booted successfully in AZ1 zone.

Actual result
=

Instance failed to boot and raise InvalidBDM Error

nova command output says:

ERROR (BadRequest): Block Device Mapping is Invalid: failed to get
volume 7c15ae47-12bd-41e7-822d-37e3619082be . (HTTP 400) (Request-ID:
req-8c36c5d1-b18d-4db5-a86f-db33c621e4e4)

nova-api.log says:

2016-12-02 20:02:48.724 150051 DEBUG cinderclient.client 
[req-8356085e-2594-4086-808e-42faba6b5ed2 22e5c7efda0345e3b4326946b8e8dc53 
579e9f03f761431dbe194c8cf2baeed9 - default default] GET call to cinderv2 for 
http://10.161.32.13:8776/v2/579e9f03f761431dbe194c8cf2baeed9/volumes/7c15ae47-12bd-41e7-822d-37e3619082be
 used request id req-4f4170af-bc29-4b92-9c7d-c9a5ce457aa8 _log_request_id 
/usr/local/lib/python2.7/dist-packages/cinderclient/client.py:95
2016-12-02 20:02:48.734 150051 DEBUG nova.quota 
[req-8356085e-2594-4086-808e-42faba6b5ed2 22e5c7efda0345e3b4326946b8e8dc53 
579e9f03f761431dbe194c8cf2baeed9 - default default] Rolled back reservations 
[u'ff856b75-4457-4b23-abe6-cf5981cacab8', 
u'74271baa-3385-4a03-bb99-86d05e30846c', 
u'09c2f52f-8f1e-46bf-9876-96f5ef1cf553'] rollback 
/usr/local/lib/python2.7/dist-packages/nova/quota.py:1427
2016-12-02 20:02:48.734 150051 INFO nova.api.openstack.wsgi 
[req-8356085e-2594-4086-808e-42faba6b5ed2 22e5c7efda0345e3b4326946b8e8dc53 
579e9f03f761431dbe194c8cf2baeed9 - default default] HTTP exception thrown: 
Block Device Mapping is Invalid: failed to get volume 
7c15ae47-12bd-41e7-822d-37e3619082be.
2016-12-02 20:02:48.735 150051 DEBUG nova.api.openstack.wsgi 
[req-8356085e-2594-4086-808e-42faba6b5ed2 22e5c7efda0345e3b4326946b8e8dc53 
579e9f03f761431dbe194c8cf2baeed9 - default default] Returning 400 to user: 
Block Device Mapping is Invalid: failed to get volume 
7c15ae47-12bd-41e7-822d-37e3619082be. __call__ 
/usr/local/lib/python2.7/dist-packages/nova/api/openstack/wsgi.py:1044
2016-12-02 20:02:48.736 150051 INFO nova.osapi_compute.wsgi.server 
[req-8356085e-2594-4086-808e-42faba6b5ed2 22e5c7efda0345e3b4326946b8e8dc53 
579e9f03f761431dbe194c8cf2baeed9 - default default] 10.161.32.13 "POST 
/v2.1/579e9f03f761431dbe194c8cf2baeed9/os-volumes_boot HTTP/1.1" status: 400 
len: 494 time: 0.4048491


Environment
===

Ubuntu 16.04, qemu, Cinder ceph
Nova version: stable/newton
Two AZs configured in Nova and Cinder

** Affects: nova
 Importance: Undecided
 Status: New

-- 
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/1648324

Title:
  When cross_az_attach set to false and creating VM with bootable
  volumes created before, InvalidBDM error raised.

Status in OpenStack Compute (nova):
  New

Bug description:
  Description
  ===

  When cross_az_attach option is set to False and you try to boot an
  instance with bootable volume created before, InvalidBDM error raised.

  Steps to reproduce
  ==

  1. Configure multiple AZs in Nova and Cinder.
- for Nova : AZ1 and AZ2
- for Cinder : AZ1 and AZ2

  2. cross_az_attach set to false in nova.conf
  [cinder]
  cross_az_attach = False

  3. Restart nova-compute service

  4. Create volume from glance image
  $ cinder create 10 --display-name test-bootable-volume --image-id {image-id} 
--availability-zone AZ1

  5. Create instance from the volume created
  $ nova boot --flavor m1.small --boot-volume 
7c15ae47-12bd-41e7-822d-37e3619082be --nic 
net-id=1493b02c-c257-45db-84ea-789f87ed7924 --availability-zone AZ1 
demo-instance

  Expected result
  ===

  Instance is booted successfully in AZ1 zone.

  Actual result
  =

  Instance failed to boot and raise InvalidBDM Error

  nova command output says:

  ERROR (BadRequest): Block Device Mapping is Invalid: failed to get
  volume 7c15ae47-12bd-41e7-822d-37e3619082be . (HTTP 400) (Request-ID:
  req-8c36c5d1-b18d-4db5-a86f-db33c621e4e4)

  nova-api.log says:

  2016-12-02 20:02:48.724 150051 DEBUG cinderclient.client 
[req-8356085e-2594-4086-808e-42faba6b5ed2 22e5c7efda0345e3b4326946b8e8dc53 
579e9f03f761431dbe194c8cf2baeed9 - 

[Yahoo-eng-team] [Bug 1447463] [NEW] glance.tests.functional.v2.test_images.TestImages.test_download_random_access failed

2015-04-23 Thread John Haan
Public bug reported:

The error message is below.

Traceback (most recent call last):
  File tools/colorizer.py, line 326, in module
if runner.run(test).wasSuccessful():
  File /usr/lib/python2.7/unittest/runner.py, line 158, in run
result.printErrors()
  File tools/colorizer.py, line 305, in printErrors
self.printErrorList('FAIL', self.failures)
  File tools/colorizer.py, line 315, in printErrorList
self.stream.writeln(%s % err)
  File /usr/lib/python2.7/unittest/runner.py, line 24, in writeln
self.write(arg)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 600-602: 
ordinal not in range(128)

There is get method from glance server.

response = requests.get(path, headers=headers)

The type of text in this response is unicode, which is
'\x1f\x8b\x08\x00\x00\x00\x00\x00\x02\xff\x8b\x02\x00gW\xbcY\x01\x00\x00\x00'

ascii codec can't encode this unicode type.

This issue is also related other unit test like test_image_life_cycle.

** Affects: glance
 Importance: Undecided
 Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1447463

Title:
  glance.tests.functional.v2.test_images.TestImages.test_download_random_access
  failed

Status in OpenStack Image Registry and Delivery Service (Glance):
  New

Bug description:
  The error message is below.

  Traceback (most recent call last):
File tools/colorizer.py, line 326, in module
  if runner.run(test).wasSuccessful():
File /usr/lib/python2.7/unittest/runner.py, line 158, in run
  result.printErrors()
File tools/colorizer.py, line 305, in printErrors
  self.printErrorList('FAIL', self.failures)
File tools/colorizer.py, line 315, in printErrorList
  self.stream.writeln(%s % err)
File /usr/lib/python2.7/unittest/runner.py, line 24, in writeln
  self.write(arg)
  UnicodeEncodeError: 'ascii' codec can't encode characters in position 
600-602: ordinal not in range(128)

  There is get method from glance server.

  response = requests.get(path, headers=headers)

  The type of text in this response is unicode, which is
  '\x1f\x8b\x08\x00\x00\x00\x00\x00\x02\xff\x8b\x02\x00gW\xbcY\x01\x00\x00\x00'

  ascii codec can't encode this unicode type.

  This issue is also related other unit test like test_image_life_cycle.

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp


[Yahoo-eng-team] [Bug 1439951] [NEW] glance.tests.unit.test_artifacts_plugin_loader unit test failed

2015-04-03 Thread John Haan
Public bug reported:

The unit tests in glance.tests.unit.test_artifacts_plugin_loader was
failed.

glance.tests.unit.test_artifacts_plugin_loader.TestArtifactsLoader
test_config_validationFAIL
test_check_function   FAIL
test_basic_loader_funcOK  0.01
test_load FAIL

Below is the result of test_load() unit test.

==
FAIL: 
glance.tests.unit.test_artifacts_plugin_loader.TestArtifactsLoader.test_load
--
Traceback (most recent call last):
testtools.testresult.real._StringException: Traceback (most recent call last):
  File 
/home/jenkins/glance/glance/tests/unit/test_artifacts_plugin_loader.py, line 
67, in test_load
'MyArtifact=%s.v1.artifact:MyArtifact' % self.path]),
  File 
/home/jenkins/glance/glance/tests/unit/test_artifacts_plugin_loader.py, line 
49, in _setup_loader
pkg_resources.EntryPoint.parse(art) for art in artifacts]
  File /usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py, line 
2366, in parse
return cls(res['name'], res['module'], attrs, extras, dist)
  File /usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py, line 
2289, in __init__
raise ValueError(Invalid module name, module_name)
ValueError: ('Invalid module name', 
'.home.jenkins.glance.glance.tests.unit.test_artifacts_plugin_loader')

---


other results were same to the test_load() test.

The reason why is that I performs unit tests as jenkins user.
Therefore my working directory is /home/jenkins/glance/ .

when getting the path for _setup_loader()

It gets full path of file which means,

path = os.path.splitext(__file__)[0].replace('/', '.')

The full path is raised ValueError for module validation check.

** Affects: glance
 Importance: Undecided
 Assignee: John Haan (yongiman)
 Status: New

** Description changed:

  The unit tests in glance.tests.unit.test_artifacts_plugin_loader was
  failed.
  
  glance.tests.unit.test_artifacts_plugin_loader.TestArtifactsLoader
- test_config_validationFAIL
- test_check_function   FAIL
- test_basic_loader_funcOK  0.01
- test_load FAIL
+ test_config_validationFAIL
+ test_check_function   FAIL
+ test_basic_loader_funcOK  0.01
+ test_load FAIL
  
  Below is the result of test_load() unit test.
  
  ==
  FAIL: 
glance.tests.unit.test_artifacts_plugin_loader.TestArtifactsLoader.test_load
  --
  Traceback (most recent call last):
  testtools.testresult.real._StringException: Traceback (most recent call last):
-   File 
/home/jenkins/glance/glance/tests/unit/test_artifacts_plugin_loader.py, line 
67, in test_load
- 'MyArtifact=%s.v1.artifact:MyArtifact' % self.path]),
-   File 
/home/jenkins/glance/glance/tests/unit/test_artifacts_plugin_loader.py, line 
49, in _setup_loader
- pkg_resources.EntryPoint.parse(art) for art in artifacts]
-   File /usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py, 
line 2366, in parse
- return cls(res['name'], res['module'], attrs, extras, dist)
-   File /usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py, 
line 2289, in __init__
- raise ValueError(Invalid module name, module_name)
+   File 
/home/jenkins/glance/glance/tests/unit/test_artifacts_plugin_loader.py, line 
67, in test_load
+ 'MyArtifact=%s.v1.artifact:MyArtifact' % self.path]),
+   File 
/home/jenkins/glance/glance/tests/unit/test_artifacts_plugin_loader.py, line 
49, in _setup_loader
+ pkg_resources.EntryPoint.parse(art) for art in artifacts]
+   File /usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py, 
line 2366, in parse
+ return cls(res['name'], res['module'], attrs, extras, dist)
+   File /usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py, 
line 2289, in __init__
+ raise ValueError(Invalid module name, module_name)
  ValueError: ('Invalid module name', 
'.home.jenkins.glance.glance.tests.unit.test_artifacts_plugin_loader')
+ 
+ ---
+ 
  
  other results were same to the test_load() test.
  
  The reason why is that I performs unit tests as jenkins user

[Yahoo-eng-team] [Bug 1290635] [NEW] remains dhcp conf file when shelving instance

2014-03-10 Thread John Haan
Public bug reported:

There is a bug for using nova-network environment module instead of
neutron.

The resources should be released during sheving instance.

However, the mac address is not deleted from dhcp conf file even
instance is shelved.

The dummy lines would be remain if the instance unshelved to other host.

Therefore, this dummy dhcp mac address should be deleted during shelving
instance work flow.

** Affects: nova
 Importance: Undecided
 Status: New

-- 
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/1290635

Title:
  remains dhcp conf file when shelving instance

Status in OpenStack Compute (Nova):
  New

Bug description:
  There is a bug for using nova-network environment module instead of
  neutron.

  The resources should be released during sheving instance.

  However, the mac address is not deleted from dhcp conf file even
  instance is shelved.

  The dummy lines would be remain if the instance unshelved to other
  host.

  Therefore, this dummy dhcp mac address should be deleted during
  shelving instance work flow.

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp


[Yahoo-eng-team] [Bug 1277339] [NEW] snapshot-failed-when-dependent-volume-exist

2014-02-06 Thread John Haan
Public bug reported:

When we use 'HpSanISCSIDriver ', there is some issues.

1. Create volume
2. Create snapshot from volume
3. Create new volume from snapshot
4. Try to delete snapshot.

In this work flow, the status of snapshot should be 'error_deleting'.

The error message says like this.

gauche version=1.0\n\n  response description=Volume delete
operation failed: \'\'The snapshot \'snapshot-d357590a-47f7-4785-bd6b-
debce5bd9a2a\' cannot be deleted because it is a clone point.  When
multiple volumes depend on a snapshot, that snapshot is a clone point.
To delete the clone point, you must first delete all but one of the
volumes that depend on it.\'\' name=CliqOperationFailed
processingTime=330 result=80001010/\n\n/gauche

** Affects: nova
 Importance: Undecided
 Status: New

-- 
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/1277339

Title:
  snapshot-failed-when-dependent-volume-exist

Status in OpenStack Compute (Nova):
  New

Bug description:
  When we use 'HpSanISCSIDriver ', there is some issues.

  1. Create volume
  2. Create snapshot from volume
  3. Create new volume from snapshot
  4. Try to delete snapshot.

  In this work flow, the status of snapshot should be 'error_deleting'.

  The error message says like this.

  gauche version=1.0\n\n  response description=Volume delete
  operation failed: \'\'The snapshot \'snapshot-d357590a-47f7-4785-bd6b-
  debce5bd9a2a\' cannot be deleted because it is a clone point.  When
  multiple volumes depend on a snapshot, that snapshot is a clone point.
  To delete the clone point, you must first delete all but one of the
  volumes that depend on it.\'\' name=CliqOperationFailed
  processingTime=330 result=80001010/\n\n/gauche

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp


[Yahoo-eng-team] [Bug 1276888] [NEW] Not return volume type id but name when nova gets volume object from cinder

2014-02-05 Thread John Haan
Public bug reported:

when nova gets volume object and untranslate its, volume_type_id regards
vol.volume_type.

Actually volume_type is returned not an id but a name.

However, some unittest defines volume_type_id to defferent type value.

1. in nova/tests/fake_volumes.py

'volume_type_id': 99

2. in nova/test/api/openstack/fakes.py

'volume_type_id': 'fakevoltype'

I think we should change the name of volume_type_id to volume_type for
appropriate meaning of value.

Otherwise, volume_type_id should be a one type.

** Affects: nova
 Importance: Undecided
 Status: New

-- 
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/1276888

Title:
  Not return volume type id but name when nova gets volume object from
  cinder

Status in OpenStack Compute (Nova):
  New

Bug description:
  when nova gets volume object and untranslate its, volume_type_id
  regards vol.volume_type.

  Actually volume_type is returned not an id but a name.

  However, some unittest defines volume_type_id to defferent type value.

  1. in nova/tests/fake_volumes.py

  'volume_type_id': 99

  2. in nova/test/api/openstack/fakes.py

  'volume_type_id': 'fakevoltype'

  I think we should change the name of volume_type_id to volume_type for
  appropriate meaning of value.

  Otherwise, volume_type_id should be a one type.

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp