[lxc-devel] [lxc-ci/master] images/oracle: Fix cloud-init issues
monstermunchkin on Github
lxc-bot at linuxcontainers.org
Fri May 22 07:19:51 UTC 2020
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 303 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20200522/770ba105/attachment-0001.bin>
-------------- next part --------------
From 01fe191883d4b2cf6e2abcee7e416c0ebaab4a97 Mon Sep 17 00:00:00 2001
From: Thomas Hipp <thomas.hipp at canonical.com>
Date: Fri, 22 May 2020 09:15:41 +0200
Subject: [PATCH 1/2] images/oracle: Fix networking on cloud variant
Signed-off-by: Thomas Hipp <thomas.hipp at canonical.com>
---
images/oracle.yaml | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/images/oracle.yaml b/images/oracle.yaml
index c0ddeb7..073b14f 100644
--- a/images/oracle.yaml
+++ b/images/oracle.yaml
@@ -111,6 +111,17 @@ files:
content: |-
[Service]
ExecStartPre=-/usr/sbin/ip link set eth0 down
+ variant:
+ - default
+
+- name: override.conf
+ path: /etc/systemd/system/NetworkManager.service.d/override.conf
+ generator: dump
+ content: |-
+ [Service]
+ ExecStartPre=-/usr/sbin/ip link set eth0 up
+ variant:
+ - cloud
- name: network
path: /etc/sysconfig/network
From f0788cf56e155d6d2cd624da5afa22a3bb24b3e7 Mon Sep 17 00:00:00 2001
From: Thomas Hipp <thomas.hipp at canonical.com>
Date: Fri, 22 May 2020 09:18:12 +0200
Subject: [PATCH 2/2] images/oracle: Resolve cloud-init errors
Cloud-init throws some non-critical errors due to missing packages and
missing /etc/fstab. This resolves the issues by installing `hostname`
and the ssh daemon, and creating an empty /etc/fstab.
Signed-off-by: Thomas Hipp <thomas.hipp at canonical.com>
---
images/oracle.yaml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/images/oracle.yaml b/images/oracle.yaml
index 073b14f..a46fc40 100644
--- a/images/oracle.yaml
+++ b/images/oracle.yaml
@@ -193,6 +193,10 @@ files:
variants:
- cloud
+- name: fstab
+ path: /etc/fstab
+ generator: dump
+
packages:
manager: yum
update: true
@@ -225,6 +229,8 @@ packages:
- packages:
- cloud-init
+ - hostname
+ - openssh-server
action: install
variants:
- cloud
More information about the lxc-devel
mailing list