Skip to content

Instantly share code, notes, and snippets.

@dongsupark
Created September 5, 2019 06:49
Show Gist options
  • Save dongsupark/ac3dc3c095291a21c86842471c5a349a to your computer and use it in GitHub Desktop.
Save dongsupark/ac3dc3c095291a21c86842471c5a349a to your computer and use it in GitHub Desktop.
packet escape to installer
++ awk -F: '{print $2}'
+ image_tag=7844cf38831a092c4c6eb712a2edd7349226dafd
+ gitpath=packethost/packet-images.git
+ gituri=https://images.packet.net/packethost/packet-images.git
+ git config --global http.sslverify false
+ ensure_reachable https://images.packet.net/packethost/packet-images.git
+ local url=https://images.packet.net/packethost/packet-images.git
+ echo -e '\033[0;33m###### Checking connectivity to "https://images.packet.net/packethost/packet-images.git"...\033[0m'
###### Checking connectivity to "https://images.packet.net/packethost/packet-images.git"...
+ is_reachable https://images.packet.net/packethost/packet-images.git
+ local host
++ gethost https://images.packet.net/packethost/packet-images.git
++ sed 's|^\[\(.*\)]$||'
++ python3 -c 'import urllib3;host=urllib3.util.parse_url('\''https://images.packet.net/packethost/packet-images.git'\'').host;assert host;print(host)'
+ host=images.packet.net
+ [[ images.packet.net =~ ^[.*]$ ]]
+ ping -c1 -W1 images.packet.net
+ echo -e '\033[0;33m###### Verifying connectivity to custom url host...\033[0m'
###### Verifying connectivity to custom url host...
+ is_reachable https://images.packet.net/packethost/packet-images.git
+ local host
++ gethost https://images.packet.net/packethost/packet-images.git
++ sed 's|^\[\(.*\)]$||'
++ python3 -c 'import urllib3;host=urllib3.util.parse_url('\''https://images.packet.net/packethost/packet-images.git'\'').host;assert host;print(host)'
^C[info ] finished [runner] elapsed=0:00:01.962408 hardware_id=f238627d-4bd7-4dbd-aa7c-cd7906509bea instance_id=preinstall
[info ] phoning home [runner] json={'instance_id': 'f238627d-4bd7-4dbd-aa7c-cd7906509bea'}
^CTraceback (most recent call last):
File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 377, in _make_request
httplib_response = conn.getresponse(buffering=True)
TypeError: getresponse() got an unexpected keyword argument 'buffering'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "run.py", line 97, in <module>
exit = handler(j)
File "/handlers.py", line 77, in handle_preinstalling
phone_home({"instance_id": hardware_id})
File "run.py", line 28, in func
resp = requests.put(url, json=json)
File "/usr/lib/python3.6/site-packages/requests/api.py", line 131, in put
return request('put', url, data=data, **kwargs)
File "/usr/lib/python3.6/site-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3.6/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 600, in urlopen
chunked=chunked)
File "/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 380, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.6/http/client.py", line 1331, in getresponse
response.begin()
File "/usr/lib/python3.6/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.6/http/client.py", line 258, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/usr/lib/python3.6/socket.py", line 586, in readinto
return self._sock.recv_into(b)
KeyboardInterrupt
+ fail
+ curl -H Content-Type: application/json -d {"type":"failure", "reason":"docker exited with an error"} http://tinkerbell.ams1.packet.net/phone-home
^C^C^C^C^C^C^C^C^C^C^C^C
* start-stop-daemon: failed to start `/sbin/runner'
* Failed to start Packet Task Runner
[ !! ]
* ERROR: runner failed to start
Welcome to Alpine Linux 3.7
Kernel 4.14.55-0-vanilla on an x86_64 (/dev/ttyS1)
localhost login:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment