#371 Ensure that Fedora images get deprecated in GCP when they're EOL
Closed: fixed 3 years ago by davdunc. Opened 3 years ago by ericedens.

It looks like F33 isn't marked as deprecated, although it became EOL in Nov 2021.

➜  ~ gcloud compute images list --project fedora-cloud --no-standard-images
NAME                                 PROJECT       FAMILY           DEPRECATED  STATUS
fedora-cloud-base-gcp-33-1-2-x86-64  fedora-cloud  fedora-cloud-33              READY
fedora-cloud-base-gcp-34-1-2-x86-64  fedora-cloud  fedora-cloud-34              READY
fedora-cloud-base-gcp-35-1-2-x86-64  fedora-cloud  fedora-cloud-35              READY

Here are some methods for deprecating an image:
- gcloud compute images deprecate
- images.deprecate using GCP's API

Similar to #358, it'd be great if we could automate this!


Metadata Update from @davdunc:
- Issue assigned to davdunc

3 years ago

Thanks Eric. I'll update those images.

Metadata Update from @ngompa:
- Issue tagged with: GCP

3 years ago
$ gcloud compute images deprecate --project fedora-cloud fedora-cloud-base-gcp-33-1-2-x86-64 --state=DEPRECATED --deprecate-in=1d --delete-in=30d
ERROR: (gcloud.compute.images.deprecate) Could not fetch resource:
 - Required 'compute.images.deprecate' permission for 'projects/fedora-cloud/global/images/fedora-cloud-base-gcp-33-1-2-x86-64'

Looks like I don't have permission for the project from fedora-cloud-testing - will need @dustymabe 's assistance.

$ gcloud compute images deprecate --project fedora-cloud fedora-cloud-base-gcp-33-1-2-x86-64 --state=DEPRECATED --deprecate-in=1d --delete-in=30d

Not sure what --delete-in=30d does but I don't think we should delete the image since we don't practice that policy in AWS either. I would drop --deprecate-in=1d --delete-in=30d from the command I think.

For permissions issue.. check your email :)

Found the permissions request. I have the necessary permissions.
I will remove the delete policy and complete the deprecation

$ gcloud compute images deprecate --project fedora-cloud fedora-cloud-base-gcp-33-1-2-x86-64 --state=DEPRECATED --deprecate-in=1d
Updated [https://www.googleapis.com/compute/v1/projects/fedora-cloud/global/images/fedora-cloud-base-gcp-33-1-2-x86-64]. 

Deprecation is completed. next step is automating this. I am thinking that we need something that enforces the deprecation by policy, probably an Ansible playbook.

Closing this and adding another ticket for the automation.

Metadata Update from @davdunc:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

3 years ago

Log in to comment on this ticket.

Metadata