-
Bug
-
Resolution: Fixed
-
Low
-
6.6.0
-
3
-
Severity 3 - Minor
-
Summary
Elastic Image crons, created in the "Image Schedule" UI fail to trigger Elastic Image startup
Steps to Reproduce
- Configure Elastic Bamboo
- Configure an Elastic Image Schedule
- Let it run
Expected Results
Instance Starts at scheduled time
Actual Results
The below exception is thrown in the atlassian-bamboo.log file:
2018-07-26 17:50:00,113 INFO [scheduler_Worker-1] [ElasticFunctionalityFacadeImpl] Adjusting elastic agents with schedule: com.atlassian.bamboo.agent.elastic.schedule.ElasticInstanceScheduleImpl@5429cf[48758785,0 50 17 ? * *,com.atlassian.bamboo.agent.elastic.server.ElasticImageConfigurationImpl@810e8617,EQUALS,1,true] 2018-07-26 17:50:00,113 INFO [scheduler_Worker-1] [ElasticFunctionalityFacadeImpl] Starting up 1 of 'Ubuntu stock image' elastic instances 2018-07-26 17:50:00,123 ERROR [scheduler_Worker-1] [JobRunShell] Job ElasticInstanceSchedule.ElasticInstanceScheduleJob threw an unhandled Exception: org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: com.atlassian.bamboo.agent.elastic.server.ElasticImageConfigurationImpl.startupScripts, could not initialize proxy - no Session ... 2018-07-26 17:50:00,178 ERROR [scheduler_Worker-1] [ErrorLogger] Job (ElasticInstanceSchedule.ElasticInstanceScheduleJob threw an exception. org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: com.atlassian.bamboo.agent.elastic.server.ElasticImageConfigurationImpl.startupScripts, could not initialize proxy - no Session] .... Caused by: org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: com.atlassian.bamboo.agent.elastic.server.ElasticImageConfigurationImpl.startupScripts, could not initialize proxy - no Session ...
Workaround
There is no known workaround for this. Instances will need to be manually started.
- mentioned in
-
Page Loading...
So there's no REST api for this. However, this worked for me:
1) Get your elasticImageConfigurationId on your image configuration page: https://your.bamboo.server.com/admin/elastic/image/configuration/viewElasticImageConfigurations.action
Click on your and you'll see some some numbers in the end of the url in browser location field. That's your elasticImageConfigurationId
2) Schedule this task in scheduler of your choice:
curl -qs -X POST -F elasticImageConfigurationId=<your image ID> -F numAgentsToCreate=X --user "username:password" --header "X-Atlassian-Token: no-check" "https://your.bamboo.server.com/admin/elastic/createElasticInstances.action"