Skip to content

Commit

Permalink
Merge pull request #1950 from flatcar/scripts
Browse files Browse the repository at this point in the history
azure updates
  • Loading branch information
jepio committed Jun 21, 2024
2 parents ea35546 + a2407a5 commit 1b26f31
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 3 deletions.
1 change: 1 addition & 0 deletions changelog/changes/2024-04-24-azure-nvme-utils.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Added azure-nvme-utils to the image, which is used by udev to create symlinks for NVMe disks on Azure v6 instances under /dev/disk/azure/. ([scripts#1950](https://github.com/flatcar/scripts/pull/1950))
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DIST azure-nvme-utils-0.0.0-1a1167d1d7780068d0af5afc3ad18a2601e951fe.zip 15473 BLAKE2B c57bc01b53bb52b0d958e6eac0d7df5b08023024dbf197f236229174fed2e8d295a4d66f123a2914f8ff11a70df83db7e7cafa56242a80c925bff53032b38b4e SHA512 48739a5da9e7fdba9c26df803354925ff508f4bb872f9dfde7461b6fec70648e1daaa7c1468960467d19243c6b3c871dd4bf060fa85e22f5576083d2a19385ed
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright 2024 Flatcar Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit cmake

GIT_COMMIT="1a1167d1d7780068d0af5afc3ad18a2601e951fe"
DESCRIPTION="Azure NVMe utilities"
HOMEPAGE="https://github.com/Azure/azure-nvme-utils"
SRC_URI="https://github.com/Azure/azure-nvme-utils/archive/${GIT_COMMIT}.zip -> ${P}-${GIT_COMMIT}.zip"

LICENSE="MIT"
SLOT="0"
KEYWORDS="amd64 arm64"

DEPEND=""
RDEPEND="${DEPEND}"
BDEPEND=""

S="${WORKDIR}/${PN}-${GIT_COMMIT}"

src_configure() {
local mycmakeargs=(
-DVERSION="${PVR}-${GIT_COMMIT}"
)
cmake_src_configure
}
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ index 00000000..66eae16e
+ # User 'core' is not a sysuser.
+ if username == 'core':
+ return False
+ return super(CoreOSUtil, self).is_sys_user(username)
+ return super(CoreosCommonUtil, self).is_sys_user(username)
+
+ def is_dhcp_enabled(self):
+ return True
Expand Down Expand Up @@ -172,7 +172,7 @@ new file mode 100644
index 00000000..e31b2923
--- /dev/null
+++ b/azurelinuxagent/common/osutil/flatcar.py
@@ -0,0 +1,78 @@
@@ -0,0 +1,80 @@
+#
+# Copyright 2023 Microsoft Corporation
+#
Expand Down Expand Up @@ -240,6 +240,8 @@ index 00000000..e31b2923
+ Restart an interface by bouncing the link. systemd-networkd observes
+ this event, and forces a renew of DHCP.
+ """
+ logger.info("not restarting interface {}".format(ifname))
+ return
+ retry_limit = retries + 1
+ for attempt in range(1, retry_limit):
+ return_code = shellutil.run("ip link set {0} down && ip link set {0} up".format(ifname))
Expand Down Expand Up @@ -404,7 +406,7 @@ new file mode 100644
index 00000000..d0d6f7c8
--- /dev/null
+++ b/init/flatcar/waagent.service
@@ -0,0 +1,30 @@
@@ -0,0 +1,31 @@
+[Unit]
+Description=Microsoft Azure Linux Agent
+Wants=network-online.target sshd.service sshd-keygen.service
Expand All @@ -419,6 +421,7 @@ index 00000000..d0d6f7c8
+# /usr/share/flatcar/etc.
+#
+ExecStartPre=/bin/bash -c 'if [[ ! -e /etc/waagent.conf ]]; then ln -sf ../usr/share/waagent/waagent.conf /etc/waagent.conf; fi'
+ExecStartPre=/bin/bash -c 'if [[ ! -e /oem/waagent.conf ]]; then ln -sf /etc/waagent.conf /oem/waagent.conf; fi'
+
+# This could be done also with:
+#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ RDEPEND="${RDEPEND}

# sys-devel/gettext: it embeds 'envsubst' binary which is useful for simple file templating.
RDEPEND="${RDEPEND}
app-admin/azure-nvme-utils
app-admin/etcd-wrapper
app-admin/flannel-wrapper
app-admin/locksmith
Expand Down

0 comments on commit 1b26f31

Please sign in to comment.