[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Pulp-list] Agent: Package.install() API

Just to make sure I'm reading this right, these calls are made by the Pulp server against consumers right?

1) change:
Packages.install(names, reboot, assumeyes)
Packages.install(names, reboot, importkeys)

The affect of "assumeyes" here is /really/ to permit YumBase to import
GPG keys as needed. Although, it's implemented in YumBase as
"assumeyes", from an API perspective, "importkeys" seems clearer.


2) change the return value of Packages.install()
[[installed], [reboot_requested, rebooted]]
{ installed : [], rebooted : <bool> }

A dict is clearer than coded list/tuples. Also, the 'reboot_requested'
flag is really not needed. The caller know that a reboot after package
install was requested. The 'rebooted' flag indicates whether the
'reboot' request actually performed. The consumer.conf can disallow

I like the change, just curious how it works. If I'm reading this right, the server calls Packages.install() on the consumer. What you're proposing here is the return value. How's that work from a technical standpoint if the consumer reboots in the middle of that call?

3) clarify the consumer.conf:


reboot_schedule = 3
import_gpg_keys = False
#assumeyes = False


permit = False
delay = 3

permit_import = False


Am I the only one who read "assumeyes" as "assume eyes"? I like the change.

The permit flags are a really good idea, especially for reboot. I like the idea of being able to configure the consumer to not be rebooted when Pulp tells it to. It looks like you're suggesting reboots to be disabled by default, which I think is probably the right call.

Can you change the delay key to be something like "delay_in_min"? I'm a big fan of keys having their units built right into the name; makes it easier on the user in case we forget .conf file comments and easier on the developer so they know what it is they are pulling in when they retrieve that value.

Jay Dobies
RHCE# 805008743336126
Freenode: jdob @ #pulp
http://pulpproject.org | http://blog.pulpproject.org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]