[WIP] [fix] Patch issues in upstream MAAS
- maas-enlist does not work with hyphenated domains. Backport from upstream fix. - Ignore MAC addresses of '00:00:00:00:00:00' to fix issue of OVS break MAAS controller registration Change-Id: I26b09bb35ef3bfc9424188dbf9fccf0ca3199441
This commit is contained in:
parent
6935bc798e
commit
2d71c24e0f
6
images/maas-rack-controller/2.3_mac_address.patch
Normal file
6
images/maas-rack-controller/2.3_mac_address.patch
Normal file
@ -0,0 +1,6 @@
|
||||
394a395,399
|
||||
> # Exclude interfaces that have duplicate MACs
|
||||
> # such as OVS gretap and erspan interfaces
|
||||
> ifaces = { k: v
|
||||
> for k, v in ifaces.items()
|
||||
> if v.get('mac', '') != '00:00:00:00:00:00'}
|
@ -46,7 +46,10 @@ RUN ln -s /usr/bin/tcpdump /usr/sbin/tcpdump
|
||||
# Patch so that Calico interfaces are ignored
|
||||
# dc6350: this appears to be fixed in maas master as of 10/4/2018, but that change is not in 2.3.5
|
||||
COPY 2.3_nic_filter.patch /tmp/2.3_nic_filter.patch
|
||||
# sh8121att: patch so that interfaces with MAC 00:00:00:00:00:00 omit the MAC address
|
||||
COPY 2.3_mac_address.patch /tmp/2.3_mac_address.patch
|
||||
RUN cd /usr/lib/python3/dist-packages/provisioningserver/utils && patch network.py < /tmp/2.3_nic_filter.patch
|
||||
RUN cd /usr/lib/python3/dist-packages/provisioningserver/utils && patch ipaddr.py < /tmp/2.3_mac_address.patch
|
||||
|
||||
# echo journalctl logs to the container's stdout
|
||||
COPY scripts/journalctl-to-tty.service /etc/systemd/system/journalctl-to-tty.service
|
||||
|
13
images/maas-region-controller/2.3_maas_enlist.patch
Normal file
13
images/maas-region-controller/2.3_maas_enlist.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/src/metadataserver/user_data/templates/snippets/maas_enlist.sh b/src/metadataserver/user_data/templates/snippets/maas_enlist.sh
|
||||
index cb9515c..394b0bd 100644
|
||||
--- a/src/metadataserver/user_data/templates/snippets/maas_enlist.sh
|
||||
+++ b/src/metadataserver/user_data/templates/snippets/maas_enlist.sh
|
||||
@@ -236,7 +236,7 @@ fi
|
||||
if echo "$serverurl" | egrep -q '(^[a-z]+://|^)[a-zA-Z0-9\.\-]+($|/$)'; then
|
||||
api_url="MAAS/api/2.0/machines/"
|
||||
else
|
||||
- api_url=`echo $serverurl | sed 's#^\(\|[a-z]\+://\)\([a-zA-Z0-9\.]\+\|\(\[[0-9a-fA-F:]\+\]\)\)\(\|\:[0-9]\+\)/##'`
|
||||
+ api_url=`echo $serverurl | sed 's#^\(\|[a-z]\+://\)\([a-zA-Z0-9\.\-]\+\|\(\[[0-9a-fA-F:]\+\]\)\)\(\|\:[0-9]\+\)/##'`
|
||||
fi
|
||||
|
||||
if [ -z "$hostname" ] && [ "$quite" != "true" ]; then
|
6
images/maas-region-controller/2.3_mac_address.patch
Normal file
6
images/maas-region-controller/2.3_mac_address.patch
Normal file
@ -0,0 +1,6 @@
|
||||
394a395,399
|
||||
> # Exclude interfaces that have duplicate MACs
|
||||
> # such as OVS gretap and erspan interfaces
|
||||
> ifaces = { k: v
|
||||
> for k, v in ifaces.items()
|
||||
> if v.get('mac', '') != '00:00:00:00:00:00'}
|
@ -65,10 +65,16 @@ COPY 2.3_route.patch /tmp/2.3_route.patch
|
||||
COPY 2.3_kernel_package.patch /tmp/2.3_kernel_package.patch
|
||||
COPY 2.3_bios_grub_partition.patch /tmp/2.3_bios_grub_partition.patch
|
||||
COPY 2.3_bios_grub_preseed.patch /tmp/2.3_bios_grub_preseed.patch
|
||||
# sh8121att: patch so that maas-enlist works with domains that contain '-'
|
||||
COPY 2.3_maas_enlist.patch /tmp/2.3_maas_enlist.patch
|
||||
# sh8121att: patch so that interfaces with MAC 00:00:00:00:00:00 omit the MAC address
|
||||
COPY 2.3_mac_address.patch /tmp/2.3_mac_address.patch
|
||||
RUN cd /usr/lib/python3/dist-packages/maasserver && patch preseed_network.py < /tmp/2.3_route.patch
|
||||
RUN cd /usr/lib/python3/dist-packages/maasserver && patch preseed.py < /tmp/2.3_kernel_package.patch
|
||||
RUN cd /usr/lib/python3/dist-packages/maasserver/models && patch partition.py < /tmp/2.3_bios_grub_partition.patch
|
||||
RUN cd /usr/lib/python3/dist-packages/maasserver && patch preseed_storage.py < /tmp/2.3_bios_grub_preseed.patch
|
||||
RUN cd /usr/lib/python3/dist-packages/metadataserver/user_data/templates/snippets && patch maas_enlist.sh < /tmp/2.3_maas_enlist.patch
|
||||
RUN cd /usr/lib/python3/dist-packages/provisioningserver/utils && patch ipaddr.py < /tmp/2.3_mac_address.patch
|
||||
|
||||
COPY journalctl-to-tty.service /etc/systemd/system/journalctl-to-tty.service
|
||||
RUN mkdir -p /etc/systemd/system/basic.target.wants ;\
|
||||
|
Loading…
x
Reference in New Issue
Block a user