Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tftp to coresmd #6

Merged
merged 2 commits into from
Nov 25, 2024
Merged

Add tftp to coresmd #6

merged 2 commits into from
Nov 25, 2024

Conversation

travisbcotton
Copy link

Adds tftp functionality to coresmd. Only serves out of /tftpboot at the moment.

Copy link
Member

@alexlovelltroy alexlovelltroy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We believe this works based on limited tests on our internal head node.

@alexlovelltroy alexlovelltroy merged commit b90307c into main Nov 25, 2024
Copy link
Collaborator

@synackd synackd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did anyone actually test this? I ran into build issues when building on Linux.

Comment on lines +101 to +103
// Start tftpserver
log.Info("starting TFTP server on port 69 with directory /tftpboot")
go startTFTPServer("/tftpboot")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we wanting to always use TFTP in coresmd or be able to toggle it on and off in the configuration file?

# Download the latest ipxe binaries from https://github.com/OpenCHAMI/ipxe-binaries/releases and unpack them in the /tftpboot directory.
RUN set -ex \
&& mkdir -p /tftpboot \
&& latest_release_url=$(curl -s https://api.github.com/repos/OpenCHAMI/ipxe-binaries/releases/latest | jq -r '.assets[] | select(.name == "ipxe.tar.gz") | .browser_download_url') \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get:

#7 [3/4] RUN set -ex     && mkdir -p /tftpboot     && latest_release_url=$(curl -s https://api.github.com/repos/OpenCHAMI/ipxe-binaries/releases/latest | jq -r '.assets[] | select(.name == "ipxe.tar.gz") | .browser_download_url')     &&
 curl -L $latest_release_url -o /tmp/ipxe.tar.gz     && tar -xzvf /tmp/ipxe.tar.gz -C /tftpboot     && rm /tmp/ipxe.tar.gz                                                                                                                 
#7 0.097 + mkdir -p /tftpboot
#7 0.100 + curl -s https://api.github.com/repos/OpenCHAMI/ipxe-binaries/releases/latest                                                                                                                                                    
#7 0.100 + jq -r '.assets[] | select(.name == "ipxe.tar.gz") | .browser_download_url'                                                                                                                                                      
#7 0.100 /bin/sh: jq: not found
#7 0.383 + latest_release_url=
#7 ERROR: process "/bin/sh -c set -ex     && mkdir -p /tftpboot     && latest_release_url=$(curl -s https://api.github.com/repos/OpenCHAMI/ipxe-binaries/releases/latest | jq -r '.assets[] | select(.name == \"ipxe.tar.gz\") | .browser_do
wnload_url')     && curl -L $latest_release_url -o /tmp/ipxe.tar.gz     && tar -xzvf /tmp/ipxe.tar.gz -C /tftpboot     && rm /tmp/ipxe.tar.gz" did not complete successfully: exit code: 127                                               
------
 > [3/4] RUN set -ex     && mkdir -p /tftpboot     && latest_release_url=$(curl -s https://api.github.com/repos/OpenCHAMI/ipxe-binaries/releases/latest | jq -r '.assets[] | select(.name == "ipxe.tar.gz") | .browser_download_url')     &&
 curl -L $latest_release_url -o /tmp/ipxe.tar.gz     && tar -xzvf /tmp/ipxe.tar.gz -C /tftpboot     && rm /tmp/ipxe.tar.gz:                                                                                                                
0.097 + mkdir -p /tftpboot
0.100 + curl -s https://api.github.com/repos/OpenCHAMI/ipxe-binaries/releases/latest
0.100 + jq -r '.assets[] | select(.name == "ipxe.tar.gz") | .browser_download_url'
0.100 /bin/sh: jq: not found
0.383 + latest_release_url=
------
Dockerfile:12

jq needs to be added to the package list on Line 7.

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

Successfully merging this pull request may close these issues.

3 participants