summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Hussey <sh8121@att.com>2018-11-14 15:48:51 -0600
committerScott Hussey <sh8121@att.com>2018-11-15 16:42:47 -0600
commit2d71c24e0fceb7868de10dc750954a494713a04c (patch)
tree106cb42e3d1d8c206170df3dbadfb1885f9d0114
parent6935bc798e7322764bbe58f3bb57aa765628ccbe (diff)
[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
Notes
Notes (review): Code-Review+2: Aaron Sheffield <ajs@sheffieldfamily.net> Code-Review+2: Bryan Strassner <bryan.strassner@gmail.com> Workflow+1: Bryan Strassner <bryan.strassner@gmail.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Fri, 16 Nov 2018 15:11:08 +0000 Reviewed-on: https://review.openstack.org/618052 Project: openstack/airship-maas Branch: refs/heads/master
-rw-r--r--images/maas-rack-controller/2.3_mac_address.patch6
-rw-r--r--images/maas-rack-controller/Dockerfile3
-rw-r--r--images/maas-region-controller/2.3_maas_enlist.patch13
-rw-r--r--images/maas-region-controller/2.3_mac_address.patch6
-rw-r--r--images/maas-region-controller/Dockerfile6
5 files changed, 34 insertions, 0 deletions
diff --git a/images/maas-rack-controller/2.3_mac_address.patch b/images/maas-rack-controller/2.3_mac_address.patch
new file mode 100644
index 0000000..c709316
--- /dev/null
+++ b/images/maas-rack-controller/2.3_mac_address.patch
@@ -0,0 +1,6 @@
1394a395,399
2> # Exclude interfaces that have duplicate MACs
3> # such as OVS gretap and erspan interfaces
4> ifaces = { k: v
5> for k, v in ifaces.items()
6> if v.get('mac', '') != '00:00:00:00:00:00'}
diff --git a/images/maas-rack-controller/Dockerfile b/images/maas-rack-controller/Dockerfile
index f99f5a7..316c4bc 100644
--- a/images/maas-rack-controller/Dockerfile
+++ b/images/maas-rack-controller/Dockerfile
@@ -46,7 +46,10 @@ RUN ln -s /usr/bin/tcpdump /usr/sbin/tcpdump
46# Patch so that Calico interfaces are ignored 46# Patch so that Calico interfaces are ignored
47# dc6350: this appears to be fixed in maas master as of 10/4/2018, but that change is not in 2.3.5 47# dc6350: this appears to be fixed in maas master as of 10/4/2018, but that change is not in 2.3.5
48COPY 2.3_nic_filter.patch /tmp/2.3_nic_filter.patch 48COPY 2.3_nic_filter.patch /tmp/2.3_nic_filter.patch
49# sh8121att: patch so that interfaces with MAC 00:00:00:00:00:00 omit the MAC address
50COPY 2.3_mac_address.patch /tmp/2.3_mac_address.patch
49RUN cd /usr/lib/python3/dist-packages/provisioningserver/utils && patch network.py < /tmp/2.3_nic_filter.patch 51RUN cd /usr/lib/python3/dist-packages/provisioningserver/utils && patch network.py < /tmp/2.3_nic_filter.patch
52RUN cd /usr/lib/python3/dist-packages/provisioningserver/utils && patch ipaddr.py < /tmp/2.3_mac_address.patch
50 53
51# echo journalctl logs to the container's stdout 54# echo journalctl logs to the container's stdout
52COPY scripts/journalctl-to-tty.service /etc/systemd/system/journalctl-to-tty.service 55COPY scripts/journalctl-to-tty.service /etc/systemd/system/journalctl-to-tty.service
diff --git a/images/maas-region-controller/2.3_maas_enlist.patch b/images/maas-region-controller/2.3_maas_enlist.patch
new file mode 100644
index 0000000..3f78cc2
--- /dev/null
+++ b/images/maas-region-controller/2.3_maas_enlist.patch
@@ -0,0 +1,13 @@
1diff --git a/src/metadataserver/user_data/templates/snippets/maas_enlist.sh b/src/metadataserver/user_data/templates/snippets/maas_enlist.sh
2index cb9515c..394b0bd 100644
3--- a/src/metadataserver/user_data/templates/snippets/maas_enlist.sh
4+++ b/src/metadataserver/user_data/templates/snippets/maas_enlist.sh
5@@ -236,7 +236,7 @@ fi
6 if echo "$serverurl" | egrep -q '(^[a-z]+://|^)[a-zA-Z0-9\.\-]+($|/$)'; then
7 api_url="MAAS/api/2.0/machines/"
8 else
9- api_url=`echo $serverurl | sed 's#^\(\|[a-z]\+://\)\([a-zA-Z0-9\.]\+\|\(\[[0-9a-fA-F:]\+\]\)\)\(\|\:[0-9]\+\)/##'`
10+ api_url=`echo $serverurl | sed 's#^\(\|[a-z]\+://\)\([a-zA-Z0-9\.\-]\+\|\(\[[0-9a-fA-F:]\+\]\)\)\(\|\:[0-9]\+\)/##'`
11 fi
12
13 if [ -z "$hostname" ] && [ "$quite" != "true" ]; then
diff --git a/images/maas-region-controller/2.3_mac_address.patch b/images/maas-region-controller/2.3_mac_address.patch
new file mode 100644
index 0000000..c709316
--- /dev/null
+++ b/images/maas-region-controller/2.3_mac_address.patch
@@ -0,0 +1,6 @@
1394a395,399
2> # Exclude interfaces that have duplicate MACs
3> # such as OVS gretap and erspan interfaces
4> ifaces = { k: v
5> for k, v in ifaces.items()
6> if v.get('mac', '') != '00:00:00:00:00:00'}
diff --git a/images/maas-region-controller/Dockerfile b/images/maas-region-controller/Dockerfile
index bbcaadc..e008e35 100644
--- a/images/maas-region-controller/Dockerfile
+++ b/images/maas-region-controller/Dockerfile
@@ -65,10 +65,16 @@ COPY 2.3_route.patch /tmp/2.3_route.patch
65COPY 2.3_kernel_package.patch /tmp/2.3_kernel_package.patch 65COPY 2.3_kernel_package.patch /tmp/2.3_kernel_package.patch
66COPY 2.3_bios_grub_partition.patch /tmp/2.3_bios_grub_partition.patch 66COPY 2.3_bios_grub_partition.patch /tmp/2.3_bios_grub_partition.patch
67COPY 2.3_bios_grub_preseed.patch /tmp/2.3_bios_grub_preseed.patch 67COPY 2.3_bios_grub_preseed.patch /tmp/2.3_bios_grub_preseed.patch
68# sh8121att: patch so that maas-enlist works with domains that contain '-'
69COPY 2.3_maas_enlist.patch /tmp/2.3_maas_enlist.patch
70# sh8121att: patch so that interfaces with MAC 00:00:00:00:00:00 omit the MAC address
71COPY 2.3_mac_address.patch /tmp/2.3_mac_address.patch
68RUN cd /usr/lib/python3/dist-packages/maasserver && patch preseed_network.py < /tmp/2.3_route.patch 72RUN cd /usr/lib/python3/dist-packages/maasserver && patch preseed_network.py < /tmp/2.3_route.patch
69RUN cd /usr/lib/python3/dist-packages/maasserver && patch preseed.py < /tmp/2.3_kernel_package.patch 73RUN cd /usr/lib/python3/dist-packages/maasserver && patch preseed.py < /tmp/2.3_kernel_package.patch
70RUN cd /usr/lib/python3/dist-packages/maasserver/models && patch partition.py < /tmp/2.3_bios_grub_partition.patch 74RUN cd /usr/lib/python3/dist-packages/maasserver/models && patch partition.py < /tmp/2.3_bios_grub_partition.patch
71RUN cd /usr/lib/python3/dist-packages/maasserver && patch preseed_storage.py < /tmp/2.3_bios_grub_preseed.patch 75RUN cd /usr/lib/python3/dist-packages/maasserver && patch preseed_storage.py < /tmp/2.3_bios_grub_preseed.patch
76RUN cd /usr/lib/python3/dist-packages/metadataserver/user_data/templates/snippets && patch maas_enlist.sh < /tmp/2.3_maas_enlist.patch
77RUN cd /usr/lib/python3/dist-packages/provisioningserver/utils && patch ipaddr.py < /tmp/2.3_mac_address.patch
72 78
73COPY journalctl-to-tty.service /etc/systemd/system/journalctl-to-tty.service 79COPY journalctl-to-tty.service /etc/systemd/system/journalctl-to-tty.service
74RUN mkdir -p /etc/systemd/system/basic.target.wants ;\ 80RUN mkdir -p /etc/systemd/system/basic.target.wants ;\