Modify

Ticket #764 (closed defect: worksforme)

Opened 10 years ago

Last modified 10 years ago

bcfg2 client YUMng will no longer install missing packages.

Reported by: Chris Stankaitis <cstankaitis@…> Owned by: desai
Priority: major Milestone: Bcfg2 1.0.0 Release
Component: bcfg2-client Version: 1.0
Keywords: Cc:

Description

I upgraded my Bcfg2 install to SVN revision 5481 and my client will no longer install packages which are missing on a server.

I am using YUMng and the Packages plugin.

a few weeks ago you gave me a patch for YUMng.py since I was having the same issue. the patch did the following.

[root@… conf.d]# diff -u -w ~chris/YUMng.py /usr/lib/python2.4/site-packages/Bcfg2/Client/Tools/YUMng.py --- /home/chris/YUMng.py 2009-10-19 09:39:08.000000000 -0400 +++ /usr/lib/python2.4/site-packages/Bcfg2/Client/Tools/YUMng.py 2009-10-14 10:00:26.000000000 -0400 @@ -227,7 +227,7 @@

cmdrc, output = self.cmd.run(pkgtool % " ".join(install_args)) if cmdrc == 0:

# The yum command succeeded. All packages installed.

  • self.logger.info("Single Pass for Install Succeded")

+ self.logger.info("Single Pass for Install Succeeded")

self.RefreshPackages?()

else:

# The yum command failed. No packages installed.

@@ -263,7 +263,7 @@

cmdrc, output = self.cmd.run(pkgtool % " ".join(upgrade_args)) if cmdrc == 0:

# The yum command succeeded. All packages installed.

  • self.logger.info("Single Pass for Install Succeded")

+ self.logger.info("Single Pass for Install Succeeded")

self.RefreshPackages?()

else:

# The yum command failed. No packages installed.

@@ -338,7 +338,7 @@

for inst in pkg:

if pkg.get('name') != 'gpg-pubkey':

pkg_arg = pkg.get('name') + '-'

  • if inst.haskey('epoch'):

+ if inst.attrib.has_key('epoch'):

pkg_arg = pkg_arg + inst.get('epoch') + ':'

pkg_arg = pkg_arg + inst.get('version') + '-' + inst.get('release') if 'arch' in inst.attrib:

Note. I used this new YUMng.py and it is still unable to install packages so it appears to be something new. Please let me know how I can help track this down and fix it.

Attachments

YUMng.py.txt (15.7 KB) - added by Chris Stankaitis <cstankaitis@…> 10 years ago.
Working Version given to me by desai

Change History

comment:1 Changed 10 years ago by Chris Stankaitis <cstankaitis@…>

Update this seems to be localized to installing missing packages as far as I can tell Yumng.py can still upgrade existing packages on server to newer versions... but it's not dealing with packages which are listed in the bundle but not on the box. I.E. if the bundle says server A needs to have "mutt" installed right now it will not install that package if it's missing.

hope that helps narrow down where to look in the code for this.

Changed 10 years ago by Chris Stankaitis <cstankaitis@…>

Working Version given to me by desai

comment:2 Changed 10 years ago by Chris Stankaitis <cstankaitis@…>

The File I just added is a patched YUMng.py which desai gave me. it was patched against 1.0pre5 where I was having a similar issue. This patched file worked for me until I upgraded to Trunk.

Even if I revert the YUMng.py to the "working" version I have it still doesn't work so I don't think the problem is in YUMng.py 100% but in something that it touches or that touches it that determines if a package is in a bundle and missing on the server.

comment:3 Changed 10 years ago by Chris Stankaitis <cstankaitis@…>

Please close this ticket. After debugging with Desai we determined that this issue was user error on my part. YUMng.py is functioning properly.

comment:4 Changed 10 years ago by desai

  • Status changed from new to closed
  • Resolution set to worksforme

WARNING! You need to establish a session before you can create or edit tickets. Otherwise the ticket will get treated as spam.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.