containers_on_aws
containers_on_aws copied to clipboard
Cannot create swarm manager when running deploy
Hi,
thank you for very informative tutorial and code examples. I tried to follow you code to setup Swarm mode, but the script failed for me with following error. I copied the error from AWS console. Any hint how to proceed further?
17:02:05 UTC+0200 DELETE_IN_PROGRESS AWS::CloudFormation::Stack Manager
17:01:35 UTC+0200 ROLLBACK_IN_PROGRESS AWS::CloudFormation::Stack oplatek-docker-swarm The following resource(s) failed to create: [Manager]. . Rollback requested by user.
17:01:33 UTC+0200 CREATE_FAILED AWS::CloudFormation::Stack Manager Embedded stack arn:aws:cloudformation:us-east-1:315173791968:stack/oplatek-docker-swarm-Manager-10ODX78HAZXIF/af6e5070-2059-11e7-9c8d-500c2893c0d2 was not successfully created: The following resource(s) failed to create: [LaunchConfiguration].
16:58:43 UTC+0200 CREATE_IN_PROGRESS AWS::CloudFormation::Stack Manager Resource creation Initiated
16:58:41 UTC+0200 CREATE_IN_PROGRESS AWS::CloudFormation::Stack Manager
16:58:38 UTC+0200 CREATE_COMPLETE AWS::CloudFormation::Stack SecurityGroups
16:58:03 UTC+0200 CREATE_IN_PROGRESS AWS::CloudFormation::Stack SecurityGroups Resource creation Initiated
16:58:02 UTC+0200 CREATE_IN_PROGRESS AWS::CloudFormation::Stack SecurityGroups
16:57:58 UTC+0200 CREATE_COMPLETE AWS::CloudFormation::Stack Bastion
16:56:26 UTC+0200 CREATE_COMPLETE AWS::CloudFormation::Stack LoadBalancer
16:53:18 UTC+0200 CREATE_IN_PROGRESS AWS::CloudFormation::Stack LoadBalancer Resource creation Initiated
16:53:17 UTC+0200 CREATE_IN_PROGRESS AWS::CloudFormation::Stack Bastion Resource creation Initiated
16:53:16 UTC+0200 CREATE_IN_PROGRESS AWS::CloudFormation::Stack LoadBalancer
16:53:15 UTC+0200 CREATE_IN_PROGRESS AWS::CloudFormation::Stack Bastion
16:53:10 UTC+0200 CREATE_COMPLETE AWS::CloudFormation::Stack Vpc
16:53:10 UTC+0200 CREATE_COMPLETE AWS::CloudFormation::Stack Kms
16:51:50 UTC+0200 CREATE_IN_PROGRESS AWS::CloudFormation::Stack Vpc Resource creation Initiated
16:51:50 UTC+0200 CREATE_IN_PROGRESS AWS::CloudFormation::Stack Kms Resource creation Initiated
16:51:49 UTC+0200 CREATE_IN_PROGRESS AWS::CloudFormation::Stack Vpc
16:51:49 UTC+0200 CREATE_IN_PROGRESS AWS::CloudFormation::Stack Kms
16:51:41 UTC+0200 CREATE_IN_PROGRESS AWS::CloudFormation::Stack oplatek-docker-swarm User Initiated
I've been on vacation, but can you provide me the logs of the nested manager stack as well? You've to change the filter to "deleted" to see that stack.
Hi, thanks for looking into it. Here is the page. It seems the LaunchConfiguration creation failed:
oplatek-docker-swarm-Manager-10ODX78HAZXIF Other Actions Update Stack
Stack name:
oplatek-docker-swarm-Manager-10ODX78HAZXIF
Stack ID:
arn:aws:cloudformation:us-east-1:315173791968:stack/oplatek-docker-swarm-Manager-10ODX78HAZXIF/af6e5070-2059-11e7-9c8d-500c2893c0d2
Status:
DELETE_COMPLETE
Status reason:
IAM Role:
Description:
Outputs
Resources
Events
2017-04-13 Status Type Logical ID Status reason
17:02:25 UTC+0200 DELETE_COMPLETE AWS::CloudFormation::Stack oplatek-docker-swarm-Manager-10ODX78HAZXIF
17:02:22 UTC+0200 DELETE_COMPLETE AWS::IAM::Role IAMRole
17:02:18 UTC+0200 DELETE_IN_PROGRESS AWS::IAM::Role IAMRole
17:02:12 UTC+0200 DELETE_COMPLETE AWS::IAM::InstanceProfile InstanceProfile
17:02:11 UTC+0200 DELETE_IN_PROGRESS AWS::IAM::InstanceProfile InstanceProfile
17:02:09 UTC+0200 DELETE_COMPLETE AWS::AutoScaling::LaunchConfiguration LaunchConfiguration
17:02:06 UTC+0200 DELETE_IN_PROGRESS AWS::CloudFormation::Stack oplatek-docker-swarm-Manager-10ODX78HAZXIF User Initiated
17:01:14 UTC+0200 CREATE_FAILED AWS::CloudFormation::Stack oplatek-docker-swarm-Manager-10ODX78HAZXIF The following resource(s) failed to create: [LaunchConfiguration].
17:01:12 UTC+0200 CREATE_FAILED AWS::AutoScaling::LaunchConfiguration LaunchConfiguration AMI ami-6f587e1c is invalid: The image id '[ami-6f587e1c]' does not exist
17:01:11 UTC+0200 CREATE_IN_PROGRESS AWS::AutoScaling::LaunchConfiguration LaunchConfiguration
17:01:05 UTC+0200 CREATE_COMPLETE AWS::IAM::InstanceProfile InstanceProfile
16:59:04 UTC+0200 CREATE_IN_PROGRESS AWS::IAM::InstanceProfile InstanceProfile Resource creation Initiated
16:59:04 UTC+0200 CREATE_IN_PROGRESS AWS::IAM::InstanceProfile InstanceProfile
16:58:59 UTC+0200 CREATE_COMPLETE AWS::IAM::Role IAMRole
16:58:49 UTC+0200 CREATE_IN_PROGRESS AWS::IAM::Role IAMRole Resource creation Initiated
16:58:48 UTC+0200 CREATE_IN_PROGRESS AWS::IAM::Role IAMRole
16:58:42 UTC+0200 CREATE_IN_PROGRESS AWS::CloudFormation::Stack oplatek-docker-swarm-Manager-10ODX78HAZXIF User Initiated
Note: that I am in the following region US East (N. Virginia) and the image is probaly in us-west according this list: https://cloud-images.ubuntu.com/query/xenial/server/released.txt
Should I just find the corresponding one in us-east region?
Yes, you're right. The AMI, I'm using probably works only for eu-west-1. If you have the proper Ami-ID, I can introduce a simple map.
I had this same issue (using the xenial AMI from ca-central-1 region).
It was getting hung up on the initial setup, where apt-get upgrade was prompting for a user input and never completed. This could be a new issue just due to a recent package update.
I fixed it by changing the following lines in the UserData section in worker.yaml and master.yaml to disable interactivity:
change:
sudo apt-get -y upgrade
to
sudo DEBIAN_FRONTEND=noninteractive apt-get -y upgrade
If this works for anyone else, I can submit a PR.
@dwoods thanks for the hint! It indeed works together with changing the AMI!