Hide Forgot
Created attachment 545959 [details] template.tdl Description of problem: Oz doesn't honor <persisted>No</persisted> syntax in system templates. After registering the system to a katello instance using subscription-manager, this results in *duplicate* repository definitions. For example ... # yum repolist Loaded plugins: product-id, subscription-manager Updating Red Hat repositories. Bad id for repo: Red Hat Enterprise Linux 6 Server RPMs 61 x86_64, byte = 3 Repository ce-puddle is listed more than once in the configuration Repository ce-brew is listed more than once in the configuration Repository vmware-tools is listed more than once in the configuration rhel-6-server-rpms | 3.7 kB 00:00 vmware-tools | 2.6 kB 00:00 repo id repo name status ce-brew ce-brew 3,314 ce-puddle ce-puddle 311 rhel-6-server-rpms Red Hat Enterprise Linux 6 Server (RPMs) 5,609 se-brew se-brew 3,124 se-puddle se-puddle 210 vmware-tools vmware-tools 10 repolist: 12,578 Version-Release number of selected component (if applicable): * aeolus-conductor-0.7.0-4.el6.noarch * imagefactory-1.0.0rc1-1.el6.noarch * iwhd-1.2-3.el6.x86_64 * oz-0.7.9-5.el6.noarch How reproducible: * 2 out of 2 attempts Steps to Reproduce: 1. Generate a valid system template using katello with Red Hat and custom provider content (see attached) # grep "<\(repository\|persisted\)" template.tdl <repository name="se-puddle"> <persisted>No</persisted> <repository name="se-brew"> <persisted>No</persisted> <repository name="ce-puddle"> <persisted>No</persisted> <repository name="ce-brew"> <persisted>No</persisted> <repository name="vmware-tools"> <persisted>No</persisted> <repository name="Red Hat Enterprise Linux 6 Server RPMs 61 x86_64"> <persisted>No</persisted> 2. Import template into conductor and perform a build/push/deploy to cloud provider of choice Actual results: On a deployed image, I see repositories for each of the <repository> entry in the system template. For example ... # ls -l /etc/yum.repos.d/ -rw-r--r--. 1 root root 284 Dec 12 2011 ce-brew.repo -rw-r--r--. 1 root root 294 Dec 12 2011 ce-puddle.repo -rw-r--r--. 1 root root 462 Dec 12 2011 Red_Hat_Enterprise_Linux_6_Server_RPMs_61_x86_64.repo -rw-r--r--. 1 root root 67 Dec 12 11:48 redhat.repo -rw-r--r--. 1 root root 529 Apr 27 2011 rhel-source.repo -rw-r--r--. 1 root root 285 Dec 12 2011 se-brew.repo -rw-r--r--. 1 root root 295 Dec 12 2011 se-puddle.repo -rw-r--r--. 1 root root 309 Dec 12 2011 vmware-tools.repo Expected results: # ls -l /etc/yum.repos.d/ -rw-r--r--. 1 root root 67 Dec 12 11:48 redhat.repo Additional info:
After adding some debugging to oz, it seems that it thinks all repositories are 'persistent' 2011-12-13 08:00:13,008 DEBUG oz.Guest.RHEL6Guest pid(2004) Message: Installing custom packages 2011-12-13 08:00:33,333 INFO oz.Guest.RHEL6Guest pid(2004) Message: Uploading custom files 2011-12-13 08:00:33,333 DEBUG oz.Guest.RHEL6Guest pid(2004) Message: Running custom commands 2011-12-13 08:00:33,333 DEBUG oz.Guest.RHEL6Guest pid(2004) Message: Removing non-persistent repos 2011-12-13 08:00:33,333 DEBUG oz.Guest.RHEL6Guest pid(2004) Message: _remove_repos :: repo='se-puddle', persistent='True' 2011-12-13 08:00:33,333 DEBUG oz.Guest.RHEL6Guest pid(2004) Message: _remove_repos :: repo='vmware-tools', persistent='True' 2011-12-13 08:00:33,333 DEBUG oz.Guest.RHEL6Guest pid(2004) Message: _remove_repos :: repo='se-brew', persistent='True' 2011-12-13 08:00:33,334 DEBUG oz.Guest.RHEL6Guest pid(2004) Message: _remove_repos :: repo='Red Hat Enterprise Linux 6 Server RPMs 61 x86_64', persistent='True' 2011-12-13 08:00:33,334 DEBUG oz.Guest.RHEL6Guest pid(2004) Message: _remove_repos :: repo='ce-puddle', persistent='True' 2011-12-13 08:00:33,334 DEBUG oz.Guest.RHEL6Guest pid(2004) Message: _remove_repos :: repo='ce-brew', persistent='True' 2011-12-13 08:00:33,334 DEBUG oz.Guest.RHEL6Guest pid(2004) Message: Syncing Looks like the Repository() object isn't initializing the value correctly. Still poking ...
Created attachment 546274 [details] 0002-Use-proper-element-name-for-persisted.patch Fix attached. I've also sent some additional related changes upstream for review (including a new unittest for this failure). https://fedorahosted.org/pipermail/aeolus-devel/2011-December/007366.html
adding ce-sprint-next bugs to ce-sprint
Fixed with this commit: https://github.com/aeolusproject/oz/commit/36767ccc8528c157bd5cfeb0b258891aaab9aa18 And included in an RPM brewed as 0.7.9-6. Switching to ON_QA
Successfully tested with packages: # rpm -qa|grep 'aeolus\|imagefactory-\|oz-\|iwhd' rubygem-imagefactory-console-0.5.0-4.20110824113238gitd9debef.el6.noarch aeolus-configure-2.6.0-0.20120111093533gitf3d033e.el6.noarch aeolus-conductor-daemons-0.9.0-0.20120111153517gite55da85.el6.noarch aeolus-conductor-doc-0.9.0-0.20120111153517gite55da85.el6.noarch imagefactory-jeosconf-ec2-rhel-1.0.0rc2.1-1.el6.noarch rubygem-aeolus-image-0.4.0-0.20120111093551git67fdf6f.el6.noarch rubygem-arel-2.0.10-0.aeolus.el6.noarch rubygem-ZenTest-4.3.3-2.aeolus.el6.noarch oz-0.8.0-0.20111219203204git5775e9d.el6.noarch iwhd-1.2-3.el6.x86_64 imagefactory-jeosconf-ec2-fedora-1.0.0rc2.1-1.el6.noarch rubygem-aeolus-cli-0.4.0-0.20120111093540git5ec8dc7.el6.noarch imagefactory-1.0.0rc2.1-1.el6.noarch aeolus-conductor-0.9.0-0.20120111153517gite55da85.el6.noarch aeolus-all-0.9.0-0.20120111153517gite55da85.el6.noarch on RHEL62 and vshpere 4.01 cloud, so I hope I can consider this bug as VERIFIED.
bugs in verified or on_qa moving off tracker