Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

wget is broken against AWS metadata #2216

Closed
ryansch opened this issue Jan 9, 2018 · 8 comments
Closed

wget is broken against AWS metadata #2216

ryansch opened this issue Jan 9, 2018 · 8 comments

Comments

@ryansch
Copy link

ryansch commented Jan 9, 2018

RancherOS Version: (ros os version)
v1.1.3
Where are you running RancherOS? (docker-machine, AWS, GCE, baremetal, etc.)
AWS

The command in question is:
wget -O - -q http://169.254.169.254/latest/meta-data/local-ipv4

On v1.0.4 this returns the instance ip.
On v1.1.3 I get wget: error getting response.

Using docker run -it --rm jess/httpie http://169.254.169.254/latest/meta-data/local-ipv4 returns the correct ip from a v1.1.3 instance showing that it's not a network issue.

Both v1.0.4 and v1.1.3 report using busybox v1.26.2 but I'm unfamiliar with the busybox build options.

Edit: I'm trying to run this from start.sh to set up some firewall rules before docker is up.

@ryansch
Copy link
Author

ryansch commented Jan 9, 2018

Workaround here: andrew-d/static-binaries#19

@niusmallnan
Copy link
Contributor

Sorry, I cannot reproduce, here are my steps.

[root@ip-172-31-14-178 rancher]# ros -v
ros version v1.1.3

[root@ip-172-31-14-178 rancher]# wget -O - -q http://169.254.169.254/latest/meta-data/local-ipv4
172.31.14.178

@sra
Copy link

sra commented Jan 10, 2018

I'm seeing this too on some of our instances launched in AWS via spotinst, which is preventing deployment of this version. I think it has to do with instance type - try reproducing on an m5.2xlarge in us-east-1

$ wget -O - -q http://169.254.169.254/latest/meta-data/local-ipv4
wget: error getting response

The m5 class requires the sriovNetSupport, maybe something there is horked.

@ryansch
Copy link
Author

ryansch commented Jan 10, 2018

@sra All of my v1.1.3 instances are m5.larges so that tracks. My static wget works fine.

@niusmallnan niusmallnan self-assigned this Jan 11, 2018
@niusmallnan
Copy link
Contributor

@sra Cool! Nice find. I will track this.

@niusmallnan niusmallnan added this to the v1.2.0 milestone Jan 11, 2018
@niusmallnan
Copy link
Contributor

It should be a bug for busybox, I have built a new rootfs for next release.
I tested with my own image, it can work on AWS m5 instances:

# upgrade os
[root@ip-172-31-32-4 rancher]# ros upgrade -i niusmallnan/os

# after reboot
[root@ip-172-31-32-4 rancher]# wget -O - -q http://169.254.169.254/latest/meta-data/local-ipv4
172.31.32.4

@sra
Copy link

sra commented Jan 15, 2018

Excellent - so a workaround for 1.1.3 is to use a different console from cloud init...

rancher:
  console: centos

Works fine for me now.

@kingsd041
Copy link
Contributor

Tested with rancheros v1.2.0-rc2. It can work on an instance of m5.larges

[root@ip-172-31-38-121 ~]# ros os version
v1.2.0-rc2
[root@ip-172-31-38-121 ~]# wget -O - -q http://169.254.169.254/latest/meta-data/local-ipv4
172.31.38.121

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants