jenkinsci / ec2-fleet-plugin

The EC2 Fleet plugin launches EC2 instances as worker nodes for Jenkins CI server, automatically scaling the capacity with the load.
https://plugins.jenkins.io/ec2-fleet/
Apache License 2.0
111 stars 81 forks source link

Upgrading 3.0.1 to 3.1.0 deleted cloud configuration #421

Closed silentgamesstudio-rpc closed 11 months ago

silentgamesstudio-rpc commented 1 year ago

Issue Details

Upon upgrading from 3.0.1 to 3.1.0 our cloud configuration was deleted. The Manage Jenkins->Clouds page showed the message "There are no clouds currently setup" and the <clouds> section of config.xml was replaced by an empty <clouds/> tag.

Rolling back the plugin to 3.0.1 and restoring config.xml from backup worked around the issue.

Environment Details

Plugin Version? 3.1.0

Jenkins Version? 2.414.3

Spot Fleet or ASG? ASG

Label based fleet? No

Linux or Windows? Windows

EC2Fleet Configuration as Code N/A

Anything else unique about your setup? No

Hildebrand-Ritense commented 1 year ago

yes, same here. Had to roll back the update and restore the config from a backup. This was on jenkins 2.416 on an Amazon Linux instance. ASG fleet + labels. Nothing special.

CaptainDonut commented 1 year ago

Same issue here, it removed my config and had to roll back for it to work. 2.416 on Amazon Linux.

JoshStutts commented 1 year ago

Ditto, we just encountered this as well when upgrading from 3.0.0 to 3.1.0 (We encountered a separate issue with 3.0.1 and had to rollback to 3.0.0 previously). Jenkins Version 2.414.3

silentgamesstudio-rpc commented 1 year ago

Looks like #423 might fix this

JonnyPower commented 1 year ago

This is quite an unbelievable rollout - thank god for backups!

davorceman commented 12 months ago

Same here. Jenkins version 2.426.1

GavinBurris42 commented 11 months ago

This issue arose from class name changes which affected the instantiation of clouds from the config.xml file. This is resolved in Release ec2-fleet-3.2.0

JonnyPower commented 11 months ago

Thanks @GavinBurris42 - we appreciate you and your work maintaining the plugin, apologies for being testy - looking forward to updating :)

ilievlad commented 11 months ago

I had the same issue with upgrade from 3.1.0 to 3.2.0

I recreated the clouds in 3.1.0 because I lost them on upgrade then.

GavinBurris42 commented 11 months ago

@ilievlad Do you have a backup for the config.xml file for version 3.1.0, or any previous version?

Version 3.2.0 has the same cloud naming conventions as version 3.0.2 and earlier. If upgrading from one of these versions, the cloud configuration will carry over.

Version 3.1.0 has a different naming convention for its clouds causing the issue. If upgrading from 3.1.0, I recommend using the CasC plugin to download your Jenkins configuration as a yaml file. This can then be uploaded as your configuration with CasC in version 3.2.0.

phillipuniverse commented 11 months ago

@GavinBurris42 I came in late to this issue, only when my upgrade from 3.1.0 -> 3.2.0 also hosed my ec2-fleet configuration. Sadly I didn't learn my lesson when 3.0 -> 3.1 also hosed it!

I think it would be better if there was a really big warning on the upgrade that this would show that all clouds were deleted in the UI, and that users needed to take a backup of config.xml before continuing.