Ticket #843 (closed enhancement: fixed)
Add "mind your own business" bcfg2.conf option for APT and YUMng client drivers
Reported by: | [email protected]… | Owned by: | desai |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | bcfg2-client | Version: | |
Keywords: | APT YUMng | Cc: |
Description
Sometimes, especially if you manage workstations, you don't care so much about the exact package composition at the client. You are interested only about a certain set of packages which you want to be there. Never mind the rest.
In that sense, APT and YUMng client drivers are "too curious", they insist on managing the entire package composition.
It would be very useful to have bcfg2.conf option which tells these client drives to care only about the packages which are listed in configuration received from the server and forget about the rest.
I have already prototyped this with APT driver, with following RefreshPackages()
def RefreshPackages(self): self.installed = {} desired = [entry.get('name') for struct in self.config for entry in struct if entry.tag == 'Package'] qcmd = """/usr/bin/dpkg-query -W --showformat='${Version}\t${Status}\n'""" packages = self.cmd.run(qcmd)[1] for pkg in desired: res = self.cmd.run('%s %s' % (qcmd, pkg)) try: version,status = res[1][0].split('\t') if status.endswith('ok installed'): self.installed[pkg] = version except ValueError, IndexError: pass
The result:
- Number of unmanaged entries dropped dramatically (from ~1500 to zero)
- Amount of data reported back to server dropped dramatically
- Considerable speedup in client operation
Attachments
Change History
comment:2 in reply to: ↑ 1 ; follow-up: ↓ 3 Changed 13 years ago by Esa V <[email protected]…>
No, I'm not using either. I'm using Bound entries like one below, directly in bundles. They fit just perfectly for our purposes. This is more a client driver issue, even if the server sends just one Package entry, the client driver examines the whole package pile.
<BoundPackage name='lsb-release' version='auto' type='deb'/>
comment:3 in reply to: ↑ 2 Changed 13 years ago by solj
Replying to Esa V <[email protected]…>:
No, I'm not using either. I'm using Bound entries like one below, directly in bundles. They fit just perfectly for our purposes. This is more a client driver issue, even if the server sends just one Package entry, the client driver examines the whole package pile.
<BoundPackage name='lsb-release' version='auto' type='deb'/>
Would it not be easier to enable Packages and replace
<BoundPackage name='lsb-release' version='auto' type='deb'/>
with
<Package name='lsb-release'/>
Not only would this be easier to read, you also get the added bonus of the client-side md5sum check for all the packages you have installed.
comment:4 follow-up: ↓ 5 Changed 13 years ago by Esa V <[email protected]…>
Might well be. But the actual point in this ticket is the client driver behavior. Using Packages would not have any effect on that, right?
comment:5 in reply to: ↑ 4 Changed 13 years ago by solj
Replying to Esa V <[email protected]…>:
Might well be. But the actual point in this ticket is the client driver behavior. Using Packages would not have any effect on that, right?
I see your point, I would just worry about the case where one of the packages you don't care about is compromised. Although, I guess you could use aide/tripwire or something to monitor that.
comment:6 Changed 13 years ago by solj
- Milestone changed from Bcfg2 1.1.0 Release to Bcfg2 1.3.0 Release
comment:7 Changed 12 years ago by desai
- Status changed from new to closed
- Resolution set to fixed
The "bundle-quick" mode implemented the client tells the client to focus strictly on entries specified in the configuration without complaining about anything else. This gets rid of the large data upload as well. It can be run using the -Q option.
comment:8 Changed 12 years ago by solj
- Milestone changed from Bcfg2 1.3.0 Release to Bcfg2 1.2.0 Release
comment:9 Changed 9 years ago by Richardheef
- Summary changed from Add "mind your own business" bcfg2.conf option for APT and YUMng client drivers to Add "mind your own business" bcfg2.conf option for APT and YUMng client drivers
- Version 1.0 deleted
- Milestone Bcfg2 1.2.0 Release deleted
Thereby, generally before the operation, they were in most engines also green from the quality not from the still longer capsaicin on the type s4-e. [https://my.swu.edu/ICS/icsfs/tabfen2.html?target=51f07631-7e69-42d0-9915-af39cb350f45 adipex consumer reviews - Year of elements and coefficient was relatively reduced.
This is actually the main reason for the Packages? plugin. Are you still using Pkgmgr?