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

cp error when starting dnsmasq #42

Closed
hardys opened this issue Dec 31, 2019 · 3 comments · Fixed by #43
Closed

cp error when starting dnsmasq #42

hardys opened this issue Dec 31, 2019 · 3 comments · Fixed by #43

Comments

@hardys
Copy link

hardys commented Dec 31, 2019

There is an error copying a pxe file on startup, in my environment dnsmasq starts, and deployment still works fine but we should probably review the files copied to ensure we have the expected files for vm/baremetal environments;

[core@localhost ~]$ sudo podman logs dnsmasq
cp: cannot stat '/usr/share/ipxe/ipxe.efi': No such file or directory
dnsmasq: started, version 2.79 DNS disabled
dnsmasq: compile time options: IPv6 GNU-getopt DBus no-i18n IDN2 DHCP DHCPv6 no-Lua TFTP no-conntrack ipset auth DNSSEC loop-detect inotify
dnsmasq-dhcp: DHCP, IP range 172.22.0.10 -- 172.22.0.100, lease time 1h
dnsmasq-dhcp: 
dnsmasq-tftp: TFTP root is /shared/tftpboot 
dnsmasq-dhcp: DHCPDISCOVER(ens4) 00:c8:ff:b6:7b:04 
dnsmasq-dhcp: DHCPOFFER(ens4) 172.22.0.72 00:c8:ff:b6:7b:04 

The copy happens here:

https://github.com/openshift/ironic-image/blob/master/rundnsmasq.sh#L22

Looking inside the container we can see these files:

[root@localhost /]# ls /usr/share/ip<tab>
ipmitool/ ipxe/     ipxe.efi/ 
[root@localhost /]# ls /usr/share/ipxe
10222000.rom  10ec8139.rom  1af41000.rom  808610d3.rom	ipxe-i386.efi	 ipxe.dsk  ipxe.lkrn  undionly.kpxe
10ec8029.rom  15ad07b0.rom  8086100e.rom  80861209.rom	ipxe-x86_64.efi  ipxe.iso  ipxe.usb
[root@localhost /]# ls /usr/share/ipxe.efi/
10222000.rom  10ec8029.rom  10ec8139.rom  15ad07b0.rom  1af41000.rom  8086100e.rom  808610d3.rom  80861209.rom

I'm not certain atm if we can just remove the copy of ipxe.efi, or if we need to rename ipxe-x86_64.efi which does exist

@hardys
Copy link
Author

hardys commented Dec 31, 2019

@elfosardo @derekhiggins perhaps you can help figure out exactly which files are needed here?

@elfosardo
Copy link

mmm considering that we have this:
https://github.com/openshift/ironic-image/blob/master/Dockerfile.ocp#L26
we should not need the copy command here:
https://github.com/openshift/ironic-image/blob/master/rundnsmasq.sh#L22
at least not as it is.

I guess renaming ipxe-x86_64.efi makes sense

@derekhiggins
Copy link

Looks to me like this is only working because nobody is using ipxe.efi with the openshift image, we don't need it for BIOS boot so I guess nobody has tried UEFI PXE chainloading(I've been using the upstream image for IPv6 work).

prepare-ipxe.sh doesn't work because its copying the file to /tftpboot, it should be /shared//tftpboot but we can't copy the files at built time as its a shared volume.

the cp command in rundnsmasq.sh doesn't work because it needs to be ipxe-x86_64.efi ,

so I think we need logic similar to whats in prepare-ipxe.sh (different paths in RHEL/Centos) but it needs to run in rundnsmasq.sh (so it happens after the shared volume is created).

I'll put a patch together and test it out.

openshift-merge-robot pushed a commit that referenced this issue Feb 26, 2020
There is no point in copying them to /tftpboot during the
build, they arn't used here, copy them directly to shared
at runtime.

Fixes #42
openshift-merge-robot pushed a commit that referenced this issue Mar 3, 2020
There is no point in copying them to /tftpboot during the
build, they arn't used here, copy them directly to shared
at runtime.

Fixes #42
openshift-merge-robot pushed a commit that referenced this issue Mar 23, 2020
There is no point in copying them to /tftpboot during the
build, they arn't used here, copy them directly to shared
at runtime.

Fixes #42
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 a pull request may close this issue.

3 participants