Skip to content

Fix merge conflict in cloud-init#24

Merged
pcd1193182 merged 2 commits into
delphix:masterfrom
pcd1193182:merge
Sep 25, 2020
Merged

Fix merge conflict in cloud-init#24
pcd1193182 merged 2 commits into
delphix:masterfrom
pcd1193182:merge

Conversation

@pcd1193182
Copy link
Copy Markdown

This PR fixes the merge conflict from http://ops.jenkins.delphix.com/job/devops-gate/job/master/job/linux-pkg-update/job/master/job/userland/job/update/549/consoleFull . The conflicts were in changes related to our use of names instead of mac addresses to identify devices.

commit 29ceb900648a33475f9a2bd43768e39ca87b0527
Merge: bede0ac bb80b42
Author:     Paul Dagnelie <pcd@delphix.com>
AuthorDate: Wed Sep 23 10:36:37 2020 -0700
Commit:     Paul Dagnelie <pcd@delphix.com>
CommitDate: Wed Sep 23 10:36:37 2020 -0700

    Merge branch 'refs/heads/upstream-HEAD' into repo-HEAD

diff --cc cloudinit/sources/DataSourceAzure.py
index 36b29eb,f3c6452..b5e282e
--- a/cloudinit/sources/DataSourceAzure.py
+++ b/cloudinit/sources/DataSourceAzure.py
@@@ -1361,9 -1387,17 +1387,16 @@@ def parse_network_config(imds_metadata)
                              '{ip}/{prefix}'.format(
                                  ip=privateIp, prefix=netPrefix))
                  if dev_config:
-                     dev_config.update(
-                         {'match': {'name': nicname},
-                          'set-name': nicname})
 -                    mac = ':'.join(re.findall(r'..', intf['macAddress']))
+                     dev_config.update({
 -                        'match': {'macaddress': mac.lower()},
++                        'match': {'name': nicname},
+                         'set-name': nicname
+                     })
...
                      netconfig['ethernets'][nicname] = dev_config
              evt.description = "network config from imds"
          else:
diff --cc cloudinit/sources/DataSourceOracle.py
index 58fa2c4,20d6487..9e562e4
--- a/cloudinit/sources/DataSourceOracle.py
+++ b/cloudinit/sources/DataSourceOracle.py
@@@ -277,6 -207,70 +207,70 @@@ class DataSourceOracle(sources.DataSour
...
+             elif self._network_config['version'] == 2:
+                 self._network_config['ethernets'][name] = {
+                     'addresses': [vnic_dict['privateIp']],
+                     'mtu': MTU, 'dhcp4': False, 'dhcp6': False,
 -                    'match': {'macaddress': mac_address}}
++                    'match': {'name': name}, 'set-name': name}
+ 
  
  def _read_system_uuid():
      sys_uuid = util.read_dmi_data('system-uuid')
diff --cc cloudinit/sources/tests/test_oracle.py
index 3367cc8,7bd2381..225b96b
--- a/cloudinit/sources/tests/test_oracle.py
+++ b/cloudinit/sources/tests/test_oracle.py
@@@ -407,186 -173,95 +173,95 @@@ class TestIsPlatformViable(test_helpers
          m_read_dmi_data.assert_has_calls([mock.call('chassis-asset-tag')])
  
  
...
-         secondary_nic_cfg = network_config['config'][1]
-         self.assertEqual(nic_name, secondary_nic_cfg['name'])
-         self.assertEqual('physical', secondary_nic_cfg['type'])
-         self.assertEqual(mac_addr, secondary_nic_cfg['mac_address'])
-         self.assertEqual(9000, secondary_nic_cfg['mtu'])
+         secondary_nic_cfg = oracle_ds.network_config['config'][1]
+         assert nic_name == secondary_nic_cfg['name']
+         assert 'physical' == secondary_nic_cfg['type']
+         assert mac_addr == secondary_nic_cfg['mac_address']
+         assert 9000 == secondary_nic_cfg['mtu']
 ...

Delphix Engineering and others added 2 commits September 18, 2020 03:34
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 3.0 (quilt)
Source: cloud-init
Binary: cloud-init
Architecture: all
Version: 20.3-2-g371b392c-0ubuntu1~18.04.1
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Standards-Version: 3.9.8
Vcs-Browser: https://git.launchpad.net/cloud-init/?h=ubuntu/devel
Vcs-Git: git://git.launchpad.net/cloud-init -b ubuntu/devel
Build-Depends: debhelper (>= 9.20160709), dh-python, iproute2, pep8, po-debconf, python3, python3-configobj, python3-httpretty, python3-jinja2, python3-jsonpatch, python3-jsonschema, python3-mock, python3-oauthlib, python3-pytest, python3-requests, python3-serial, python3-setuptools, python3-yaml
Package-List:
 cloud-init deb admin optional arch=all
Checksums-Sha1:
 75f81b953c19c8f047805cdaf3e3a0dd3636f386 1168105 cloud-init_20.3-2-g371b392c.orig.tar.gz
 f4a92518ab038fc38719157034893826b6749564 73008 cloud-init_20.3-2-g371b392c-0ubuntu1~18.04.1.debian.tar.xz
Checksums-Sha256:
 979e84467e6b84cbd254379e8aaf5768ac6c605342aba8ddadfc20fb8d2f7e89 1168105 cloud-init_20.3-2-g371b392c.orig.tar.gz
 e55a7bb8259940493d793d0954c691995386623618dce299880a8da38e155be9 73008 cloud-init_20.3-2-g371b392c-0ubuntu1~18.04.1.debian.tar.xz
Files:
 5ed87c260ce0e4ece3f67e00be54b57f 1168105 cloud-init_20.3-2-g371b392c.orig.tar.gz
 4261ed0cdeaa994d7c9519176e3bcdb1 73008 cloud-init_20.3-2-g371b392c-0ubuntu1~18.04.1.debian.tar.xz
Python-Version: all

-----BEGIN PGP SIGNATURE-----

iQJNBAEBCgA3FiEE4lRR4CIbV3Pev/F47NrLFgmVrYkFAl9IlmIZHGNoYWQuc21p
dGhAY2Fub25pY2FsLmNvbQAKCRDs2ssWCZWtibBXEAClcALt7/+4tsdOUpQRR1mN
WTt/R9qlhNgy2nKo0gsj82KrvMOuNuFn0CqLdK/X7NaAlVym78mVXVOh/aQfPR82
2PCTenmhYKIvBhD105O3FzqZk9DDjg+0dLY7joVuIngMIRAKjB+mH7Avhe/qk9om
bGqUc+xnbNGyXvElYC54qqFH2bIoWWbdRaVtVEAXBF4PhTBVfPQIPrT7afTc2bS8
CHqct5y6c+yJbOxxcr5VbbxRlQkiN6s9hQFr48OuDnMaqd9Z3DL7z45wFTGTr4rP
BiZbjXIZE45bJhKIW5ISkp0k0tvlg4uX4QnY15VB2TyvESVcTSwMfOZVdLPzWW5d
slxVsVsPo2RjnT+s3j6Q41//dHbSZi7c2P4xWtU/aSK6rAd9hrLv3NRdcxTORqhX
vO+5PVpca0AShahcr/U1no4qqHD0b5hOKl1Fzcn/CCyqgj/Sbh8gimwabQqo+mAF
pbKs4Xj2J5TL8SG/ChvzBmsv+qeMqcB0EkQ1NRJ1S6eoAQ3ARJjvBRL+/to3/DFW
x09GApyV9hNX7G8ueefqM4MfXOCuF2AWidehIRLxS+pBB+P60Zt3NvzmYlTd9HJE
2OcH54n7R/noy/rY+dkUiqk1LF/XXgw8fv3MnPfm3m2Th0NxFW/GvWgVbmVG+NC7
7ZDdizgCOc2/Bnf8Omyffw==
=FR3L
-----END PGP SIGNATURE-----
@pcd1193182 pcd1193182 merged commit 73a7c42 into delphix:master Sep 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants