Skip to content

Commit

Permalink
Revert "Ensure system_cfg read before ds net config on Oracle (canoni…
Browse files Browse the repository at this point in the history
…cal#1174)"

This reverts commit b306633.

While this ultimately seems like a better solution, currently the
file /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg exists on
all Oracle launched instances which will prevent networking from
being properly initialized.
  • Loading branch information
TheRealFalcon committed Mar 10, 2022
1 parent 558f037 commit cc8a478
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 33 deletions.
2 changes: 1 addition & 1 deletion cloudinit/sources/DataSourceOracle.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ class DataSourceOracle(sources.DataSource):
vendordata_pure = None
network_config_sources = (
sources.NetworkConfigSource.cmdline,
sources.NetworkConfigSource.system_cfg,
sources.NetworkConfigSource.ds,
sources.NetworkConfigSource.initramfs,
sources.NetworkConfigSource.system_cfg,
)

_network_config = sources.UNSET
Expand Down
27 changes: 0 additions & 27 deletions tests/integration_tests/network/test_net_config_load.py

This file was deleted.

8 changes: 3 additions & 5 deletions tests/unittests/sources/test_oracle.py
Original file line number Diff line number Diff line change
Expand Up @@ -920,14 +920,12 @@ def test_secondary_nic_failure_isnt_blocking(
assert network_config == m_read_initramfs_config.return_value
assert "Failed to parse secondary network configuration" in caplog.text

def test_ds_network_cfg_order(self, _m):
"""Ensure that DS net config is preferred over initramfs config
but less than system config."""
def test_ds_network_cfg_preferred_over_initramfs(self, _m):
"""Ensure that DS net config is preferred over initramfs config"""
config_sources = oracle.DataSourceOracle.network_config_sources
system_idx = config_sources.index(NetworkConfigSource.system_cfg)
ds_idx = config_sources.index(NetworkConfigSource.ds)
initramfs_idx = config_sources.index(NetworkConfigSource.initramfs)
assert system_idx < ds_idx < initramfs_idx
assert ds_idx < initramfs_idx


# vi: ts=4 expandtab

0 comments on commit cc8a478

Please sign in to comment.