Restore the upstream directory structure #200

Merged
mchiappero merged 1 commits from mchiappero/Factory:alignment-directories into main 2025-07-08 09:29:06 +02:00
20 changed files with 11 additions and 10 deletions

View File

@@ -62,8 +62,9 @@ RUN echo 'alias mkisofs="xorriso -as mkisofs"' >> ~/.bashrc
COPY mkisofs_wrapper /usr/bin/mkisofs
RUN set -euo pipefail; chmod +x /usr/bin/mkisofs
COPY auth-common.sh configure-ironic.sh ironic-common.sh rundnsmasq runhttpd runironic runlogwatch.sh tls-common.sh configure-nonroot.sh ironic-probe.j2 /bin/
RUN set -euo pipefail; chmod +x /bin/auth-common.sh; chmod +x /bin/configure-ironic.sh; chmod +x /bin/ironic-common.sh; chmod +x /bin/rundnsmasq; chmod +x /bin/runhttpd; chmod +x /bin/runironic; chmod +x /bin/runlogwatch.sh; chmod +x /bin/tls-common.sh; chmod +x /bin/configure-nonroot.sh;
COPY scripts/ /bin/
COPY configure-nonroot.sh /bin/
RUN set -euo pipefail; chmod +x /bin/configure-ironic.sh /bin/rundnsmasq /bin/runhttpd /bin/runironic /bin/runlogwatch.sh /bin/configure-nonroot.sh

This copies runironic-exporter which AFAICS was not previously copied, and looks like it won't work due to missing dependencies - since we don't currently test/support it I'd suggest we just remove it and skip copying it from upstream until/unless there is a requirement for it?

This copies runironic-exporter which AFAICS was not previously copied, and looks like it won't work due to missing dependencies - since we don't currently test/support it I'd suggest we just remove it and skip copying it from upstream until/unless there is a requirement for it?

It's just a leftover, I'm not sure how it passed the build...

It's just a leftover, I'm not sure how it passed the build...

Sorry, I have mis-read your message earlier... So either we copy it to align with upstream until we make a decision or drop it right now? I think it's fine to drop it, but it's not bad to minimize the amount of changes, which is probably what I'd prefer more. Unless I'm missing the point again.

Sorry, I have mis-read your message earlier... So either we copy it to align with upstream until we make a decision or drop it right now? I think it's fine to drop it, but it's not bad to minimize the amount of changes, which is probably what I'd prefer more. Unless I'm missing the point again.

My point is until now this wasn't copied into the image at all (we had an unused file but it's not COPY'd in the Dockerfile)

With this change it is copied, but AFAICS the script won't work because we don't have gunicorn installed.

So I think we have to either remove it, or make it work, I'm proposing the former as I'm not aware of any use-cases currently which require it, but we can perhaps add the missing dependency if you prefer

My point is until now this wasn't copied into the image at all (we had an unused file but it's not COPY'd in the Dockerfile) With this change it is copied, but AFAICS the [script won't work]([url](https://src.opensuse.org/suse-edge/Factory/src/branch/main/ironic-image/runironic-exporter#L11)) because we don't have gunicorn installed. So I think we have to either remove it, or make it work, I'm proposing the former as I'm not aware of any use-cases currently which require it, but we can perhaps add the missing dependency if you prefer

Thanks for the input, see PR #204.

Thanks for the input, see PR #204.
RUN mkdir -p /tftpboot
RUN mkdir -p $GRUB_DIR
@@ -85,18 +86,18 @@ RUN if [ "$(uname -m)" = "aarch64" ]; then\
COPY --from=base /tmp/esp-x86_64.img /tmp/uefi_esp-x86_64.img
COPY --from=base /tmp/esp-aarch64.img /tmp/uefi_esp-arm64.img
COPY ironic.conf.j2 /etc/ironic/
COPY inspector.ipxe.j2 httpd-ironic-api.conf.j2 ipxe_config.template /tmp/
COPY network-data-schema-empty.json /etc/ironic/
COPY ironic-config/ironic.conf.j2 /etc/ironic/
COPY ironic-config/inspector.ipxe.j2 ironic-config/httpd-ironic-api.conf.j2 ironic-config/ipxe_config.template /tmp/
COPY ironic-config/network-data-schema-empty.json /etc/ironic/

Note this empty schema file doesn't exist upstream, it might be a good candidate for an upstream PR with some variable to enable the related Ironic config (disabled by default upstream) - I think it could be justified as other community members may well be interested in enabling other network-data payloads which don't conform to the openstack schema

Note this empty schema file doesn't exist upstream, it might be a good candidate for an upstream PR with some variable to enable the related Ironic config (disabled by default upstream) - I think it could be justified as other community members may well be interested in enabling other network-data payloads which don't conform to the openstack schema

So, IIUC, you are proposing to keep it in v30.0.0 as well, rather than removing it as in https://src.opensuse.org/suse-edge/Factory/commit/da9f8f9c2c4cd9cd3ab91ec786af39ae8b7680da3fe?

So, IIUC, you are proposing to keep it in v30.0.0 as well, rather than removing it as in [https://src.opensuse.org/suse-edge/Factory/commit/da9f8f9c2c4cd9cd3ab91ec786af39ae8b7680da3fe](https://src.opensuse.org/suse-edge/Factory/commit/da9f8f9c2c4cd9cd3ab91ec786af39ae8b7680da3fe)?

Yes it's necessary to keep this, as it allows us to pass nmstate format for the preprovisioningNetworkData and networkData - without the empty schema Ironic won't allow this as it doesn't match the OpenStack network-data format

Yes it's necessary to keep this, as it allows us to pass nmstate format for the preprovisioningNetworkData and networkData - without the empty schema Ironic won't allow this as it doesn't match the OpenStack network-data format

I see, fundamental to have then... I will rework the changes, once we have a single patch we can create a branch from there and add the missing bits for proposing the change upstream. Thank you!

I see, fundamental to have then... I will rework the changes, once we have a single patch we can create a branch from there and add the missing bits for proposing the change upstream. Thank you!
# DNSMASQ
COPY dnsmasq.conf.j2 /etc/
COPY ironic-config/dnsmasq.conf.j2 /etc/
# Custom httpd config, removes all but the bare minimum needed modules
COPY httpd.conf.j2 /etc/httpd/conf/
COPY httpd-modules.conf /etc/httpd/conf.modules.d/
COPY apache2-vmedia.conf.j2 /etc/httpd-vmedia.conf.j2
COPY apache2-ipxe.conf.j2 /etc/httpd-ipxe.conf.j2
COPY ironic-config/httpd.conf.j2 /etc/httpd/conf/
COPY ironic-config/httpd-modules.conf /etc/httpd/conf.modules.d/
COPY ironic-config/apache2-vmedia.conf.j2 /etc/httpd-vmedia.conf.j2
COPY ironic-config/apache2-ipxe.conf.j2 /etc/httpd-ipxe.conf.j2
# Workaround
# Removing the 010-ironic.conf file that comes with the package