update package list before installing new packages #174

Closed
opened 2021-11-20 15:20:45 +00:00 by ungleich-gitea · 4 comments

Created by: greendeath

I faced some issues, that the package list from apt gets not updated and then the installation fails because the package can't be found.
I currently only know from apt, but we should ensure that for every cdist package type does a refresh of the package lists before installing a package.

*Created by: greendeath* I faced some issues, that the package list from apt gets not updated and then the installation fails because the package can't be found. I currently only know from apt, but we should ensure that for every cdist package type does a refresh of the package lists before installing a package.
ungleich-gitea added the
Stale
feature
labels 2021-11-20 15:20:45 +00:00
Author
Owner

closed

closed
Author
Owner

Created by: tom-ee

__package_update_index got the --maxage <seconds>-parameter (for apt) w/ commit 4d4d76bb38.
With --maxage 3600 the apt-get update only runs if the last update was at least 1 hour ago.

*Created by: tom-ee* __package_update_index got the `--maxage <seconds>`-parameter (for apt) w/ commit 4d4d76bb382126b69d1ac79faa98176c3a5744db. With `--maxage 3600` the `apt-get update` only runs if the last update was at least 1 hour ago.
Author
Owner

Created by: tom-ee

For the specific issue: Updating the package cache introduces
a) longer runtimes for cdist
b) increased network-traffic and
c) more dependencies on external network
Depending on the interval cdist is running this executed the impact of this varies.
CFEngine has the concept of time and thus the ability to allow things like "update the package cache if it is older than X". For apt I did a hack by adding an optional parameter --maxage N to __package_upate_index to reduce the impact.

A pre/post stage would be great though :)

*Created by: tom-ee* For the specific issue: Updating the package cache introduces a) longer runtimes for cdist b) increased network-traffic and c) more dependencies on external network Depending on the interval cdist is running this executed the impact of this varies. CFEngine has the concept of time and thus the ability to allow things like "update the package cache if it is older than X". For apt I did a hack by adding an optional parameter `--maxage N` to __package_upate_index to reduce the impact. A pre/post stage would be great though :)
Author
Owner

Created by: telmich

My opinion is that we need to introduce something like a "pre" and "post" stage in cdist - @asteven and I discussed this briefly before - do you have the notes, @asteven?

*Created by: telmich* My opinion is that we need to introduce something like a "pre" and "post" stage in cdist - @asteven and I discussed this briefly before - do you have the notes, @asteven?
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: ungleich-public/cdist#174
No description provided.