Reputation: 127
I am using openshift-ansible (https://github.com/openshift/openshift-ansible) that was partially customized for our needs. The part launching the instances was modified to set the group_id nothing more was changed in it.
When creating a master openshift all works fine. However when creating 2 nodes of openshift I can see the 2 instances being created in the "Running instance" panel of the EC2 Dashboard. The instances are for a few seconds in state Initializing and they automatically switch to "Shutting down"
Ansible on its side was still in the task of launching the instances. So my question is:
Is there a way to analyze logs of the instances of AWS when new instances are being created ?
Log of the last ansible task:
TASK: [Launch instance(s)] **************************************************** REMOTE_MODULE ec2 region=eu-west-1 keypair=ggkey1-eu-west state=present instance_type=m3.large user_data='#cloud-config mounts: - [ xvdb ] - [ ephemeral0 ] write_files: - content: | DEVS=/dev/xvdb VG=docker_vg path: /etc/sysconfig/docker-storage-setup owner: root:root permissions: '"'"'0644'"'"' ' vpc_subnet_id=subnet-60cf1205 image=ami-33ba2a44 count=2 EXEC ['/bin/sh', '-c', 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1441977401.88-262307796372076 && echo $HOME/.ansible/tmp/ansible-tmp-1441977401.88-262307796372076'] PUT /tmp/tmp4r8qve TO /root/.ansible/tmp/ansible-tmp-1441977401.88-262307796372076/ec2 EXEC ['/bin/sh', '-c', u'LANG=C LC_CTYPE=C /usr/bin/env python2 /root/.ansible/tmp/ansible-tmp-1441977401.88-262307796372076/ec2; rm -rf /root/.ansible/tmp/ansible-tmp-1441977401.88-262307796372076/ >/dev/null 2>&1'] failed: [localhost] => {"failed": true} msg: wait for instances running timeout on Fri Sep 11 13:21:43 2015
$ ansible --version
ansible 1.9.2 configured module search path = None
$ uname -a
Linux ip-172-31-42-45 3.10.0-123.8.1.el7.x86_64 #1 SMP Mon Sep 22 19:06:58 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux root@ip-172-31-42-45 : ~/uha-rbox-spawner$
Thanks,
Upvotes: 0
Views: 1325
Reputation: 24573
Is there a way to analyze logs of the instances of AWS when new instances are being created ?
You are looking for "get console output". You can see it in the AWS (http) console, or you can fetch it from awscli or the API of your choice.
"get console output" is slightly confusing since the AWS Console is also a "console". Think of it as "system logs" (as the Console does), or simply "what would show on a screen in a datacenter".
Upvotes: 0