Public bug reported:

[ Impact ]

Cloud-init recently added policy-based routing for netplan-only systems
on EC2. In order to gate the netplan-specific code, it checked to see in
the netplan activator was being used. However, if the datasource is
fetched in init-local timeframe (such as on EC2), it is possible to
specify a different renderer without also changing the activator. This
means the netplan-gating no longer works, even when rendering to a non-
netplan system.

The fix is to instead check if we're using the netplan renderer before
rendering the netplan-specific code.

[ Test Plan ]

Launch an Ubuntu instance on EC2 having two NICs attached.
Run "apt update; apt install ifupdown"
In /etc/cloud/cloud.cfg, update the `renderers` line to start with `eni` rather 
than `netplan`
`cloud-init clean --logs --reboot`
Connect to instance
Verify no networking related tracebacks exist in logs
Verify /etc/network/interfaces.d/ contains valid networking information for 
both NICs.

Run tests/integration_tests/modules/test_hotplug.py and
tests/integration_tests/test_networking.py
to ensure no regression to existing multinic rendering behavior.

[ Where problems could occur ]

If the renderer is still somehow misdetecting a netplan or non-netplan
based system, we could still attempt to render netplan config where we
shouldn't be, or instead skip rendering the config where we shouldn't
be.

[ Other Info ]

Upstream bug: https://github.com/canonical/cloud-init/issues/5318
Upstream fix: https://github.com/canonical/cloud-init/pull/5321

** Affects: cloud-init (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: cloud-init (Ubuntu Focal)
     Importance: Undecided
         Status: New

** Affects: cloud-init (Ubuntu Jammy)
     Importance: Undecided
         Status: New

** Affects: cloud-init (Ubuntu Mantic)
     Importance: Undecided
         Status: New

** Affects: cloud-init (Ubuntu Noble)
     Importance: Undecided
         Status: New

** Affects: cloud-init (Ubuntu Oracular)
     Importance: Undecided
         Status: New

** Description changed:

  [ Impact ]
  
  Cloud-init recently added policy-based routing for netplan-only systems
  on EC2. In order to gate the netplan-specific code, it checked to see in
  the netplan activator was being used. However, if the datasource is
  fetched in init-local timeframe (such as on EC2), it is possible to
  specify a different renderer without also changing the activator. This
  means the netplan-gating no longer works, even when rendering to a non-
  netplan system.
  
  The fix is to instead check if we're using the netplan renderer before
  rendering the netplan-specific code.
  
  [ Test Plan ]
  
- Launch an Ubuntu instance on EC2 having two NICs attached. 
+ Launch an Ubuntu instance on EC2 having two NICs attached.
  Run "apt update; apt install ifupdown"
  In /etc/cloud/cloud.cfg, update the `renderers` line to start with `eni` 
rather than `netplan`
  `cloud-init clean --logs --reboot`
  Connect to instance
  Verify no networking related tracebacks exist in logs
  Verify /etc/network/interfaces.d/ contains valid networking information for 
both NICs.
  
  Run tests/integration_tests/modules/test_hotplug.py and
  tests/integration_tests/test_networking.py
  to ensure no regression to existing multinic rendering behavior.
  
  [ Where problems could occur ]
  
  If the renderer is still somehow misdetecting a netplan or non-netplan
  based system, we could still attempt to render netplan config where we
  shouldn't be, or instead skip rendering the config where we shouldn't
  be.
  
+ [ Other Info ]
  
- [ Other Info ]
-  
- Upstream bug:
+ Upstream bug: https://github.com/canonical/cloud-init/issues/5318
  Upstream fix: https://github.com/canonical/cloud-init/pull/5321

** Also affects: cloud-init (Ubuntu Oracular)
   Importance: Undecided
       Status: New

** Also affects: cloud-init (Ubuntu Mantic)
   Importance: Undecided
       Status: New

** Also affects: cloud-init (Ubuntu Noble)
   Importance: Undecided
       Status: New

** Also affects: cloud-init (Ubuntu Jammy)
   Importance: Undecided
       Status: New

** Also affects: cloud-init (Ubuntu Focal)
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2066985

Title:
  Mutli-nic ENI rendering fails if ENI activator not used

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/2066985/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to