maas-import-ephemerals deletes only with --delete

Bug #1238145 reported by Scott Moser
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Unassigned

Bug Description

The current simplestreams based maas-import-ephemerals only deletes if the user passes '--delete'.
This is reasonable to an extent, but it makes '--max' basically worthless.

simplestreams 'sync' has 2 variables to control this:
 a.) 'max' is an integer value. If provided to the mirror, it will only keep the lastest MAX versions that are being mirrored. If unset, it will mirror all versions available.
 b.) 'keep' is a boolean value. If keep is true (default is false) and max is set to a value larger than the number of versions available, it will keep versions found locally that are not found remotely. If 'keep' is false then local versions older than remote versions will be deleted.

The implementation we have right now is just to not delete unless '--delete' is provided. I think the default behavior of sstreams is probably correct or at least acceptable. Let the user specify a 'max' (likely 1 or 2), and let deletes happen as they would.

We do want to make sure that new products that are not found in the remote are not deleted. Ie, if '12.10:ephemeral:amd64' is not a product remotely, we do not want to delete all local values. That might happen when support is dropped, but without a special flag, the user would want to keep their local things.

Revision history for this message
Julian Edwards (julian-edwards) wrote :

Seems like --max and --keep imply --delete, excepting local-only files.

Changed in maas:
status: New → Triaged
importance: Undecided → High
tags: added: m-i-p-f provisioning
Changed in maas:
status: Triaged → Fix Committed
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.