Bug 1302323 - method listVirtualGuests doesn't return correct id of virtual systems
Summary: method listVirtualGuests doesn't return correct id of virtual systems
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: API
Version: 2.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tomas Lestach
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space27
TreeView+ depends on / blocked
 
Reported: 2016-01-27 13:45 UTC by Pavel Studeník
Modified: 2017-09-28 18:07 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-16 07:43:29 UTC


Attachments (Terms of Use)

Description Pavel Studeník 2016-01-27 13:45:32 UTC
Description of problem:
I received wrong id of virtual systems by method system.listVirtualGuests:

>>> sys_list = client.system.listVirtualGuests(key, serverId)
>>> for i in range(len(sys_list)):
        print sys_list[i]
{'guest_name': 'system-wed27jan2016_01_56_09_6361', 'uuid': '5d43220357ed9471a22c5590a9cf280a', 'id': 1000010004}
{'guest_name': 'system-wed27jan2016_14_09_54_27329', 'uuid': '5aaf5953634e5f83f408dab298cbf397', 'id': 1000010004}

But ID 1000010004 is host of this virtual systems.

On Satellite I received corrects ids.


Version-Release number of selected component (if applicable):
spacewalk-java-2.5.43-1.el6.noarch

How reproducible:
always

Steps to Reproduce:
1. create some virtual guests on host
2. show virtual systems by api 

Actual results:
System's id is id of host

Expected results:
System's id is id of correct virtual host

Comment 1 Jiri Precechtel 2016-05-18 09:14:26 UTC
Fixed:

- created patch for Cobbler snippet “post_install_network_config” which was trying to use not initiated variable (ipv6_autoconfiguration)
- this caused that snippet was not expanded into kickstart script
- during execution of the kickstart script a steps which should follow after end of this snippet were not executed then (including machine registration)
- due to not occurred machine registration an API function system.listVirtualGuests() was returning incorrect values then

Spacewalk-git-commit: 21d0f35997fba82dcce6d3b551cc005b0d603a47

If the solution does not work for you, re-assign this bug please.

Comment 2 Jiri Precechtel 2016-05-19 08:30:23 UTC
Fixed: 

API function system.listVirtualGuests() still returns correct ids of properly registered virtual guests. But in case that virtual guest is not registered (for any reason), the key "id" is not present in result structure of the virtual guest.


Spacewalk-git-commit: 14816d9f6b21e85003e7251fc2b6d7c517a59ade

If the solution does not work for you, re-assign this bug please.

Comment 3 Jiri Precechtel 2016-05-24 11:22:52 UTC
Note:

Spacewalk-git-commit: 21d0f35997fba82dcce6d3b551cc005b0d603a47 was reverted (in commit c069d4fa9d7812903b2f5c2b9d89fc05ae8a1179), solution was to apply Satellite patch which supports ipv6 on cobbler side (done in Spacewalk-git-commit: 191f262c0ab0497203428a95231d7b8de170e6d8

Comment 5 Tomáš Kašpárek 2016-06-16 07:43:29 UTC
Spacewalk 2.5 was released.

Comment 6 Eric Herget 2017-09-28 18:07:56 UTC
This BZ closed some time during 2.5, 2.6 or 2.7.  Adding to 2.7 tracking bug.


Note You need to log in before you can comment on or make changes to this bug.