missing /etc/environment file #65
Comments
This was intended but we should probably revise it if folks are depending on the old contents of /etc/environment. For EC2/OpenStack instances we moved the detection of $public_ipv4 and $private_ipv4 directly into coreos-cloudinit so that it would work gracefully with both EC2-style metadata services and config drive. The old /usr/share/oem/bin/coreos-setup-environment shipped with those images hung if no metadata service was available, breaking config drive based OpenStack systems. On the current alpha release you can continue generating /etc/environment with:
We never documented |
Hey thanks for the response! You are right, there was never a documentation that says people can rely on the ExecStart=/bin/bash -c "HOST_IP=$(/bin/ifconfig eth0 | awk '/inet /{print $2}') && exec /usr/bin/docker run -rm -name %n -p $HOST_IP::6379 crosbymichael/redis" Further the amount of data can be written using cloudinit is limited (to 4096 bytes?). It would be really cool to be able to use the environment file further, but that decision should not rely on my personal habits. |
Oh no! This break me. I'll bring this up on the mailing list because it's a larger topic around simple service discovery. |
We're using https://github.com/deis/deis/blob/master/controller/systemd/deis-controller.service#L7,#L11 |
This is fixed in 367.1.0 which rolled out to alpha over the weekend. |
👍 |
Can we continue to use this file in our deployment or is this going to be a deprecated(supported for now) feature ? |
You can continue to use it. |
This issue appears to be happening (still? again?) in 522.2.0 and 494.5.0. |
557.2.0 is missing |
@antgeo I think it depends on the platforms. Vagrant still has /usr/share/oem/bin/coreos-setup-environment (CoreOS beta (584.0.0)) and /etc/environment is created. On AWS EC2 (557.2 and 584 for me), /usr/share/oem/bin/coreos-setup-environment doesn't exist, but /etc/environment does - it was created with the instance's public and private IP as part of the cloud-init. I used to have units that depend on coreos-setup-environment.service, now I use ConditionPathExists=/etc/environment/etc/environment on AWS EC2 instances. |
both
|
@anapsix What platform are you on? |
@philips, running CoreOS 633.1.0 on bare metal |
@anapsix On bare metal we have no metadata service to query so we haven't created /etc/environment on those environments for quite some time. Are you seeing a regression on this from a previous version you were using? |
I see your point @philips. However Consider this:
During processing of |
Hi, I am at |
I have the same problem with CoreOS stable 723.3.0. |
@ntquyen $private_ipv4 is not supported on all platforms. see the note at https://coreos.com/os/docs/latest/cloud-config.html#coreos. please file a new issue if the problem exists on a platform where it is documented to work. |
Hey there,
sorry for the lack of knowledge, but I don't know where to place this issue elsewhere. Back to topic. I just started a coreos cluster using the ec2 alpha channel image
ami-11c51066
with coreos version367.0.0
. I wondered why some units failed, the reason was the missingetc/environment
file.coreos-setup-environment.service
does exist/usr/share/oem/bin/coreos-setup-environment
does not existcore@ip-xxx-xx-xx-xxx ~ $ cat /usr/share/oem/bin/coreos-setup-environment cat: /usr/share/oem/bin/coreos-setup-environment: No such file or directory
/etc/environment
does not existcore@ip-xxx-xx-xx-xxx ~ $ ls /etc/environment ls: cannot access /etc/environment: No such file or directory
unfortunately there was no error for the service
I did not find any documentation that this is intended behaviour. Any ideas? Thanks guys. <3
The text was updated successfully, but these errors were encountered: