delphix / appliance-build

This repository contains the code used to build the Ubuntu-based Delphix Appliance, leveraging open-source tools such as Debian's live-build, Docker, Ansible, OpenZFS, and others.
Apache License 2.0
19 stars 41 forks source link

DLPX-91434 cloud-init config to disable it should be copied due to conflict with upstream naming found in DLPX-91387 #764

Closed palash-gandhi closed 4 months ago

palash-gandhi commented 4 months ago

Problem

cloud-init introduced logic to remove a configuration file that our app stack creates and expects after the first boot. This configuration is supposed to disable cloud-init from overwriting the netplan file that the app stack creates after the first boot. Beginning end of May or early June, we started seeing that OCI upgrade runs had failing tests because `delphix-osadmin` failed to start after the upgrade. `cloud-init`'s upgrade removed the configuration that the osadmin service expected to be present. I am still not sure why we have started seeing this now since the upstream changes landed in our fork in July of last year. What I have verified is that the following commit in our repo is a good version (23.4.4): ``` commit 41b9123a50d71d9a5ca708a79a9fe959bc7bb304 (tag: release/23.0.0.0, tag: release/22.0.0.1, tag: release /22.0.0.0, origin/projects/HF-1365, origin/projects/HF-1361, origin/projects/HF-1359, origin/projects/HF-13 55, origin/projects/HF-1351, origin/patch) Merge: 5e72921 ad10748 Author: John Wren Kennedy Date: Mon Mar 4 14:08:40 2024 -0700 ``` and this is a bad version (24.1.3): ``` commit 25ce69265022d300f167cea7d92be86e8251bfd4 (origin/release, origin/dlpx/test/___develop___/pgandhi-del phix/25ce69265022d300f167cea7d92be86e8251bfd4) Merge: 41b9123 e4a13f5 Author: George Wilson Date: Wed May 29 22:41:14 2024 -0400 Merge pull request #86 from grwilson/merge DLPX-91090 cloud-init merge conflict ```

Solution

To resolve the naming conflict, https://github.com/delphix/dlpx-app-gate/pull/2244 renames the file from `99-disable-network-config.cfg` to `99-delphix-disable-network-config.cfg`. This PR updates the upgrade scripts to copy the old config file to the new file.

Testing Done

ab-pre-push with both changes: http://selfservice.jenkins.delphix.com/job/appliance-build-orchestrator-pre-push/8756/console OCI upgrade from 24.0 to resulting 25.0 upgrade image: http://selfservice.jenkins.delphix.com/job/blackbox-chained/6508/console Verified that delphix-osadmin is up and that the cloud-init configuration was copied over. ``` delphix@dlpx-qa-24000-bb-chain-6508-8532dd44-nic-1:~$ sudo systemctl status delphix-osadmin ● delphix-osadmin.service - Delphix osadmin service Loaded: loaded (/lib/systemd/system/delphix-osadmin.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2024-06-18 05:45:34 UTC; 9h ago delphix@dlpx-qa-24000-bb-chain-6508-8532dd44-nic-1:~$ get-appliance-version 25.0.0.0-snapshot.20240617223424240+jenkins-selfservice-appliance-build-develop-pre-push-2938 delphix@dlpx-qa-24000-bb-chain-6508-8532dd44-nic-1:~$ get-appliance-platform oci delphix@dlpx-qa-24000-bb-chain-6508-8532dd44-nic-1:~$ ls /etc/cloud/cloud.cfg.d/ 05_logging.cfg 91-delphix-platform.cfg 99-delphix-disable-network-config.cfg README 90_dpkg.cfg 99-delphix-datasource.cfg 99-delphix-internal.cfg delphix@dlpx-qa-24000-bb-chain-6508-8532dd44-nic-1:~$ cat /etc/cloud/cloud.cfg.d/99-delphix-disable-network-config.cfg --- network: config: "disabled" ```