yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #72090
[Bug 1760460] [NEW] INSTANCE_ID not available from "runcmd"
Public bug reported:
The AWS-related environment variable `INSTANCE_ID` is not populated
within the context of a "runcmd", like it is for a "bootcmd". In
"bootcmd", the value is set to the AWS EC2 instance id, as obtained from
the metadata endpoint.
I reproduced this with a minimal cloud-init file:
```
#cloud-config
# bootcmd executes during the first boot only
bootcmd:
- echo "INSTANCE_ID=$INSTANCE_ID" >> /tmp/bootcmd
# runcmd executes these lines during the initial boot
runcmd:
- echo "INSTANCE_ID=$INSTANCE_ID" >> /tmp/runcmd
```
** Affects: cloud-init
Importance: Undecided
Status: New
** Tags: aws
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1760460
Title:
INSTANCE_ID not available from "runcmd"
Status in cloud-init:
New
Bug description:
The AWS-related environment variable `INSTANCE_ID` is not populated
within the context of a "runcmd", like it is for a "bootcmd". In
"bootcmd", the value is set to the AWS EC2 instance id, as obtained
from the metadata endpoint.
I reproduced this with a minimal cloud-init file:
```
#cloud-config
# bootcmd executes during the first boot only
bootcmd:
- echo "INSTANCE_ID=$INSTANCE_ID" >> /tmp/bootcmd
# runcmd executes these lines during the initial boot
runcmd:
- echo "INSTANCE_ID=$INSTANCE_ID" >> /tmp/runcmd
```
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1760460/+subscriptions
Follow ups