[PATCH V6 00/20] Bug fix patches for 0.6.2
by Wenchao Xia
This serial fix a batch of issues.
v6:
general change:
rebase and add John Ferlan's patches after the tail.
2/20: do not add this property now, just fixed the spelling in code, since
it is only set when Xen is used in libvirt-cim, so it is OK.
3/20: also fixed debug print spelling.
5/20: squashed patch for debug print crash issues.
6/20: spelling fix in commit message.
7/20: skipped free_diskpool on fail of setting parent pool, refined the
code in get_diskpool_config() when libvirt pool was not used, removed the
duplicated macro in .c file, set member to NULL in parse_diskpool_line when
fail.
8/20: squashed the patch with John Ferlan's one about "adjust logic" for it.
11/20: free the domain ptr after domain name retrieving.
13/20: rename no_root_ssh_key to use_non_root_ssh_key, fail when file can't
be deleted before copy in ssh_key_copy().
17/20: small code style change for {} in if condition.
18/20: added a macro to activate it.
19/20: added three macro to activate them, added {} in if statement when
only one sentence follow.
John Ferlan (7):
14 Makefile.am: Remove the $(top_srcdir) from subst command
15 libvirt-cim.spec: Use systemctl for tog-pegasus restart
16 Remove empty newline at bottom
17 xmlgen: Only support script on bridge for xen domains
18 libxkutil: Use virConnectListAllDomains() to fetch domains
19 DevicePool: Use the virConnectListAll interfaces
20 register: Adjust the chatter output
Wenchao Xia (13):
1 Remove property CreationClassName in some instance
2 SDC: Fix spelling for property IsFullVirt
3 SDC: use property BootDevices instead of BootDevice
4 do not deregister virt classes in yum upgrade
5 CSI, DevicePool, RASDIndication: fix debug print crash
6 CSI, add lock to protect shared data in lifecycle_thread
7 DevicePool, reimplement get_diskpool_config with libvirt
8 device parsing, add debug print
9 CSI Discard libvirt event by default
10 CSI: Move native CSI code together
11 VSSD: report success if not all VS fail in enum
12 misc_util: better way to read config
13 migration: allow ssh based migration with non root's key file
Makefile.am | 18 +-
libvirt-cim.conf | 19 +
libvirt-cim.spec.in | 24 +-
libxkutil/cs_util_instance.c | 26 +
libxkutil/device_parsing.c | 19 +-
libxkutil/misc_util.c | 135 +++-
libxkutil/misc_util.h | 6 +-
libxkutil/xmlgen.c | 26 +-
provider-register.sh | 9 +-
schema/SwitchService.registration | 1 -
src/Virt_AllocationCapabilities.c | 3 +-
src/Virt_ComputerSystem.c | 66 ++-
src/Virt_ComputerSystemIndication.c | 1018 +++++++++++++++++---
src/Virt_ConsoleRedirectionService.c | 3 +-
src/Virt_ConsoleRedirectionServiceCapabilities.c | 3 +-
src/Virt_Device.c | 18 +-
src/Virt_DevicePool.c | 480 ++++++++--
src/Virt_DevicePool.h | 4 +
src/Virt_EnabledLogicalElementCapabilities.c | 3 +-
src/Virt_FilterEntry.c | 3 +-
src/Virt_FilterList.c | 3 +-
src/Virt_HostSystem.c | 3 +-
src/Virt_KVMRedirectionSAP.c | 3 +-
src/Virt_RASD.c | 3 +-
src/Virt_ReferencedProfile.c | 3 +-
src/Virt_RegisteredProfile.c | 3 +-
src/Virt_ResourceAllocationSettingDataIndication.c | 6 +-
src/Virt_ResourcePoolConfigurationCapabilities.c | 3 +-
src/Virt_ResourcePoolConfigurationService.c | 8 +-
src/Virt_SettingsDefineCapabilities.c | 14 +-
src/Virt_SwitchService.c | 3 +-
src/Virt_VSMigrationCapabilities.c | 3 +-
src/Virt_VSMigrationService.c | 270 +++++-
src/Virt_VSMigrationSettingData.c | 3 +-
src/Virt_VSSD.c | 50 +-
src/Virt_VirtualSystemManagementCapabilities.c | 3 +-
src/Virt_VirtualSystemManagementService.c | 67 ++-
src/Virt_VirtualSystemSnapshotService.c | 3 +-
...Virt_VirtualSystemSnapshotServiceCapabilities.c | 3 +-
39 files changed, 1990 insertions(+), 348 deletions(-)
11 years, 7 months
[PATCH V3 0/2] libcmpiutil: patch rebase for libvirt-cim 6.2
by Wenchao Xia
Hi, Danial
Sorry for have sent confusing patches, please use this serial for libcmpiutil.
Wenchao Xia (2):
libcmpiutil: fix potential debug print crash
libcmpiutil: add time and thread info in debug log
debug_util.c | 19 ++++++++++++++++++-
std_indication.c | 14 ++++++++++++--
2 files changed, 30 insertions(+), 3 deletions(-)
11 years, 7 months
[PATCH V5 00/15] Bug fix patches for 0.6.2
by Wenchao Xia
This serial fix a serial of issues.
V5:
General change:
Remove script change patch, need John Ferlan's patch in following.
1/15-3/15: new patch make libvirt-cim conform to DSP more.
6/15: better commit message.
8/15: remove a strdup() to reduce a error path.
10/15: free *xml after a fail.
11/15: return fail when ind == NULL in trigger_mod_indiction(),
check return value for calloc() in doms_to_xml(), better debug message,
check strdup() return on raise_indication, better traverse in dom list.
Reduce condition macros.
12/15: new patch to move CSI-libvirt/CSI-libvirt-cim together.
13/15: remove defensive code, only fix the problem of report fail when
some VSSD succeed.
14/15: new separate patch from 15/15, to enhance config reading.
15/15: changed the interface, new method to copy/delete the key,
rm the key before copy and check the key's status after copy.
Wenchao Xia (15):
1 Remove property CreationClassName in some instance
2 VSSD: add missing property IsFullVirt in schema
3 SDC: use property BootDevices instead of BootDevice
4 do not deregister virt classes in yum upgrade
5 CSI, fix debug print crash
6 CSI, add lock to protect shared data in lifecycle_thread
7 DevicePool, fix debug print crash
8 DevicePool, reimplement get_diskpool_config with libvirt
9 RASDIndication, fix debug print crash
10 device parsing, add debug print
11 CSI Discard libvirt event by default
12 CSI: Move native CSI code together
13 VSSD: report success if not all VS fail in enum
14 misc_util: better way to read config
15 migration: allow ssh based migration with non root's key file
libvirt-cim.conf | 19 +
libvirt-cim.spec.in | 12 +-
libxkutil/device_parsing.c | 16 +-
libxkutil/misc_util.c | 135 +++-
libxkutil/misc_util.h | 6 +-
schema/Virt_VSSD.mof | 3 +
src/Virt_AllocationCapabilities.c | 3 +-
src/Virt_ComputerSystem.c | 66 ++-
src/Virt_ComputerSystemIndication.c | 1018 +++++++++++++++++---
src/Virt_ConsoleRedirectionService.c | 3 +-
src/Virt_ConsoleRedirectionServiceCapabilities.c | 3 +-
src/Virt_Device.c | 18 +-
src/Virt_DevicePool.c | 198 +++--
src/Virt_EnabledLogicalElementCapabilities.c | 3 +-
src/Virt_FilterEntry.c | 3 +-
src/Virt_FilterList.c | 3 +-
src/Virt_HostSystem.c | 3 +-
src/Virt_KVMRedirectionSAP.c | 3 +-
src/Virt_RASD.c | 3 +-
src/Virt_ReferencedProfile.c | 3 +-
src/Virt_RegisteredProfile.c | 3 +-
src/Virt_ResourceAllocationSettingDataIndication.c | 6 +-
src/Virt_ResourcePoolConfigurationCapabilities.c | 3 +-
src/Virt_ResourcePoolConfigurationService.c | 8 +-
src/Virt_SettingsDefineCapabilities.c | 10 +-
src/Virt_SwitchService.c | 3 +-
src/Virt_VSMigrationCapabilities.c | 3 +-
src/Virt_VSMigrationService.c | 269 +++++-
src/Virt_VSMigrationSettingData.c | 3 +-
src/Virt_VSSD.c | 46 +-
src/Virt_VirtualSystemManagementCapabilities.c | 3 +-
src/Virt_VirtualSystemManagementService.c | 63 ++-
src/Virt_VirtualSystemSnapshotService.c | 3 +-
...Virt_VirtualSystemSnapshotServiceCapabilities.c | 3 +-
34 files changed, 1652 insertions(+), 295 deletions(-)
11 years, 7 months
[PATCHv2 0/8] Additional patches for 0.6.2
by John Ferlan
This series replaces my last set. It is a followup after rebase and rework to:
https://www.redhat.com/archives/libvirt-cim/2013-March/msg00029.html
Changes in v2:
* Rework libxkutil/cs_util_instance.c to mirror functions as requested
* Rework src/Virt_DevicePool.c to mirror functions as requested
* Just merged the Makefile.am changes into one
* Previous patch 4/10 to CSI is removed due to code change already posted
Still to be reviewed is Makefile.am.
John Ferlan (8):
Makefile.am: Remove the $(top_srcdir) from subst command
libvirt-cim.spec: Use systemctl for tog-pegasus restart
Remove empty newline at bottom
xmlgen: Only support script on bridge for xen domains
libxkutil: Use virConnectListAllDomains() to fetch domains
libxkutil: Adjust get_dominfo() logic
DevicePool: Use the virConnectListAll interfaces
register: Adjust the chatter output
Makefile.am | 18 +--
libvirt-cim.spec.in | 12 +-
libxkutil/cs_util_instance.c | 24 ++++
libxkutil/device_parsing.c | 7 +-
libxkutil/xmlgen.c | 25 +++--
provider-register.sh | 9 +-
schema/SwitchService.registration | 1 -
src/Virt_DevicePool.c | 230 ++++++++++++++++++++++++++++++++++++++
8 files changed, 296 insertions(+), 30 deletions(-)
--
1.8.1.4
11 years, 7 months
Re: [Libvirt-cim] [PATCH V4] DevicePool, reimplement get_diskpool_config with libvirt
by John Ferlan
Since I don't have an email to reply-to, here is the link:
https://www.redhat.com/archives/libvirt-cim/2012-December/msg00039.html
In get_diskpool_config():
* Rather than use the "racy" NumOfStoragePools and ListStoragePools, why
not use virConnectListAllStoragePools() passing the "Active" flag for
all active pools only?
* You may even want to consider keeping the returned virStoragePoolPtr
structures around..
I also imagine the other objects (networks and domains) could use the
similar calls. I guess the answer somewhat depends on what is the
minimum version of libvirt that needs to be supported.
But if you "have" to stay with the current model...
* The return 'names[i]' is something you'd have to free() anyway, so
rather than strdup(names[i]), just take it when setting pools[i].tag and
set names[i] = NULL; That avoids an error path.
John
11 years, 7 months
[PATCH 0/9] cimtest changes
by John Ferlan
Here's my set of cimtest changes. Quite a few of the changes deal with the
illegal MAC address that starts with 99-* - this is a multicast MAC which
is not allowed. There are changes to handle systemd/nfs, a couple dealing
with fedora vs. rhel default network device name, and a couple of fixes that
I just dug into to resolve on my f18 box.
I get the following results:
=================================================
FAIL : 4
XFAIL : 3
SKIP : 11
PASS : 174
-----------------
Total : 192
=================================================
FAIL Test Summary:
ComputerSystemIndication - 01_created_indication.py: FAIL
RASDIndications - 01_guest_states_rasd_ind.py: FAIL
RASDIndications - 02_guest_add_mod_rem_rasd_ind.py: FAIL
VirtualSystemManagementService - 22_addmulti_brg_interface.py: FAIL
=================================================
XFAIL Test Summary:
SwitchService - 01_enum.py: XFAIL
VirtualSystemManagementService - 28_definesystem_with_vsi_profile.py: XFAIL
VirtualSystemManagementService - 30_dynamic_disk_mod.py: XFAIL
=================================================
SKIP Test Summary:
ComputerSystem - 02_nosystems.py: SKIP
ComputerSystemMigrationJobIndication - 01_csmig_ind_for_offline_mig.py: SKIP
LogicalDisk - 02_nodevs.py: SKIP
Profile - 04_verify_libvirt_cim_slp_profiles.py: SKIP
VirtualSystemMigrationService - 01_migratable_host.py: SKIP
VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP
VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP
VirtualSystemMigrationService - 06_remote_live_migration.py: SKIP
VirtualSystemMigrationService - 07_remote_offline_migration.py: SKIP
VirtualSystemMigrationService - 08_remote_restart_resume_migration.py: SKIP
VSSD - 02_bootldr.py: SKIP
John Ferlan (9):
Need to check "slp=true", not just "slp" since "slp=false" is possible
Change the MAC from "99:" to "88:"
Create a temporary directory for disk pool tests
Use symbols as named in libvirt-cim for easier reference
Fix nfs-server lookup code
Fix os_status passing to reporter functions
Resolve issues found in test.
On Fedora systems default to using 'em1' instead of 'eth1'
19 - resolve issues found in test
.../Profile/04_verify_libvirt_cim_slp_profiles.py | 2 +-
.../08_CreateDiskResourcePool.py | 26 ++++++--
.../09_DeleteDiskPool.py | 19 ++++--
.../15_DiskPoolAutostart.py | 11 +++-
.../libvirt-cim/cimtest/VSSD/06_duplicate_uuid.py | 2 +-
.../06_addresource.py | 2 +-
.../08_modifyresource.py | 4 +-
.../13_refconfig_additional_devs.py | 4 +-
.../15_mod_system_settings.py | 11 ++--
.../18_define_sys_bridge.py | 2 +-
.../19_definenetwork_ers.py | 17 +++--
.../22_addmulti_brg_interface.py | 2 +-
.../27_definesystem_macvtap_dev.py | 19 +++++-
.../28_definesystem_with_vsi_profile.py | 15 +++++
suites/libvirt-cim/lib/XenKvmLib/common_util.py | 77 +++++++++++++++++-----
suites/libvirt-cim/lib/XenKvmLib/const.py | 6 +-
suites/libvirt-cim/lib/XenKvmLib/test_xml.py | 2 +-
suites/libvirt-cim/main.py | 15 +++++
18 files changed, 183 insertions(+), 53 deletions(-)
--
1.8.1.4
11 years, 7 months
[PATCH 00/10] Adjustments based on recent review
by John Ferlan
As requested here is a series of patches to address a couple of issues
I discovered during my initial foray into using libvirt-cim as well as
from my code review. These are all *based on* the code I reviewed.
Feel free to pick, choose, and apply. I have run them on my f18 system
and things seem to work, but it's possible I've made a configuration error.
I also will have a series of cimtest fixes, but I need to tidy them up
a bit before sending.
I did figure out that rather than uninstalling and reinstalling the
package, I can use make preuninstall, make preinstall, restart the
CIMOM, make install, and make postinsall which seems to replace the
mofs "mostly correctly". There is an error in the postinstall phase
which I haven't had the cycles to chase yet.
John Ferlan (10):
Remove empty newline at bottom
Makefile.am: Remove the $(top_srcdir) from subst command
xmlgen: Only support script on bridge for xen domains
CSI: Fix bug found during 'make distcheck'
Makefile.am: Use the top_srcdir rather than direct path in subst
libxkutil: Use virConnectListAllDomains() to fetch domains
libvirt-cim.spec: Use systemctl for tog-pegasus restart
libxkutil: Adjust get_dominfo() logic
DevicePool: Use the virConnectListAll interfaces
register: Adjust the chatter output
Makefile.am | 18 +++---
libvirt-cim.spec.in | 10 ++-
libxkutil/cs_util_instance.c | 23 +++++++
libxkutil/device_parsing.c | 10 +--
libxkutil/xmlgen.c | 25 +++++---
provider-register.sh | 9 +--
schema/SwitchService.registration | 1 -
src/Virt_ComputerSystemIndication.c | 4 ++
src/Virt_DevicePool.c | 121 +++++++++++++++++++++++++++++++++++-
9 files changed, 190 insertions(+), 31 deletions(-)
--
1.8.1.4
11 years, 7 months
Tyrel Datwyler is out of the office.
by Tyrel Datwyler
I will be out of the office starting 03/13/2013 and will not return until
03/18/2013.
During this time I will not have access to email. In the case of any urgent
issues please contact my back up David Heller.
11 years, 7 months
Re: [Libvirt-cim] [PATCH V3 11/11] allow ssh based migration with non root's key file
by John Ferlan
Since I don't have the original email to reply-to, here is a link:
https://www.redhat.com/archives/libvirt-cim/2012-December/msg00033.html
libvirt-cim.conf
Consider changing the following:
+# Defines a temp key file which would be used as ssh key in ssh migration,
+# Only valid when SSH_Key is set in migration call.
+# If SSH_Key is not in a directory owned by root, set this value to a path
+# owned by root, tells libvirt-cim copy it there before use it. The directory
+# in the path must exist and totally owned by root.
+# If SSH_Key is already in a valid place, don't set it to to tell libvirt-cim
+# use SSH_Key directly.
# Only valid when SSH_Key is set for the migration call.
#
# In order to allow using a non-root owned SSH Key during migration, set this variable
# to a location to copy the SSH_Key from the SSH_Key path and file not owned by root
# to a directory path and file owned by root. The target path must exist and it must
# be owned by root. If it is not, the migration will fail.
#
# If the SSH_Key is already in a directory owned by root there is no need to set, thus
# allowing libvirt-cim to use the SSH_Key directly.
libxkutil/misc_util.c
In libvirt_cim_config_get()
* The 'default:' case should probably also which prop->name was being used for the prop->value_type
In is_read_only() & get_mig_ssh_tmp_key()
* Probably should initialize prop.value_string = NULL just to be clear
* Call to libvirt_cim_config_get() does not check return status - perhaps make setting prop.have_read conditional on return value...
src/Virt_VSMigrationService.c
In ssh_key_cp():
* Do you need a path to 'cp' (eg /sbin/cp)?
* Is it worth a stat() afterwards to ensure the copy occurred since your fgets() isn't returning anything?
* Other thoughts - should there be a "stat" and "rm" before? Perhaps another safety ensure we copy something?
In get_msd_values()
* Since you already print the source ssh_key file, change the the copy src to dest message to just indicate the destination (e.g. "Copying ssh key to '%s'.", tmp_keyfile)
So let's say this is successful, now we leave the 'migrate_ssh_temp_key' around? Is that a good idea? Shouldn't there be a corresponding 'unlink()' after we're done? We're really not a "temporary" file if we keep it around. In fact, after the connection is made, shouldn't we be able to safely delete the file?
John
Finally, this one seems to require/need an update to documentation "somewhere" to describe that new conf variable... That is how does one know how to use this unless they read the conf file?
11 years, 7 months