Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix daily recipe ubuntu/jammy new_upstream_snaphot to refresh quilt patches #5691

Merged
merged 23 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
9faafb0
Release 24.3 (#5646)
blackboxsw Aug 30, 2024
e30ce6b
fix(scaleway): Don't override IPv6 routes when IPv4 not primary (#5640)
NoSuchCommand Sep 3, 2024
5a74d19
chore(azurelinux): update cloud.cfg.tmpl for azurelinux
rmhsawyer Sep 3, 2024
60a856a
test: assert that schema is valid by default (#5657)
holmanb Sep 4, 2024
9cc458c
fix(systemd): add Before=shutdown.target to cloud-init-main.service.t…
aciba90 Sep 4, 2024
3e74d5e
fix(netops): fix ip addr flush command (#5651)
holmanb Aug 31, 2024
30addd2
test: add test coverage for iproute2 commands (#5651)
holmanb Sep 3, 2024
b10d905
Release 24.3.1 (#5375) (#5663)
blackboxsw Sep 4, 2024
eddfe02
chore: drop broken optimization (#5666)
holmanb Sep 5, 2024
82efd3e
chore: bump ci dependency versions (#5660)
holmanb Sep 5, 2024
f79471a
feat: make pyserial an optional dependency (#5637)
aciba90 Jul 20, 2024
d8fd56d
chore: fix typo in requirements.txt (#5637)
aciba90 Jul 20, 2024
1a6fd6f
feat(ec2): Bump url_max_timeout to 240s from 120s. (#5565)
halfdime-code Sep 6, 2024
8b99980
chore: make ansible test serial (#5677)
holmanb Sep 6, 2024
7a750e3
chore: fix tip-ruff and update to latest version (#5676)
TheRealFalcon Sep 6, 2024
5d91e96
ci: fix packaging test when no patches (#5680)
holmanb Sep 6, 2024
7a0d957
chore: Prefer other methods over $INSTANCE_ID (#5661)
TheRealFalcon Sep 9, 2024
e1f05b7
doc: remove misleading warning (#5681)
holmanb Sep 9, 2024
10df0c1
test: add deprecation support to verify_clean_boot (#5671)
holmanb Sep 5, 2024
313390f
test: add verify_clean_boot() calls alongside verify_clean_log() (#5671)
holmanb Sep 5, 2024
94db4ef
merge from upstream/main at 24.3-19-g313390f8
blackboxsw Sep 11, 2024
ec1249e
refresh patches based on main
blackboxsw Sep 11, 2024
22c81c6
update changelog (new upstream snapshot)
blackboxsw Sep 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions .github/workflows/check_format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: "Checkout #1"
uses: actions/checkout@v3.0.0
uses: actions/checkout@v4

- name: "Checkout #2 (for tools/read-version)"
run: |
Expand All @@ -46,10 +46,10 @@ jobs:
strategy:
fail-fast: false
name: Check json format
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: "Checkout #1"
uses: actions/checkout@v3.0.0
uses: actions/checkout@v4

- name: "Test format"
run: |
Expand All @@ -61,19 +61,19 @@ jobs:
strategy:
fail-fast: false
name: Check docs
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: "Checkout #1"
uses: actions/checkout@v3.0.0
uses: actions/checkout@v4

- name: "Checkout #2 (for tools/read-version)"
run: |
git fetch --unshallow
git remote add upstream https://git.launchpad.net/cloud-init
- name: "Install Python 3.10"
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10.8'
python-version: '3.11.9'
- name: "Install dependencies"
run: |
sudo DEBIAN_FRONTEND=noninteractive apt-get -qy update
Expand All @@ -91,10 +91,10 @@ jobs:

shell-lint:
name: Shell Lint
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v3.0.0
uses: actions/checkout@v4

- name: Install ShellCheck
run: |
Expand All @@ -106,9 +106,9 @@ jobs:
shellcheck ./tools/ds-identify

check-cla-signers:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3.0.0
- uses: actions/checkout@v4

- name: Check CLA signers file
run: tools/check-cla-signers
59 changes: 23 additions & 36 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,70 +20,57 @@ env:
RELEASE: focal

jobs:
package-build:
runs-on: ubuntu-22.04
build-package-and-run-tests:
runs-on: ubuntu-24.04
steps:
- name: "Checkout"
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
# Fetch all tags for tools/read-version
fetch-depth: 0
- name: Prepare dependencies
run: |
sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get -y install \
debhelper \
dh-python \
fakeroot \
python3-setuptools \
sbuild \
ubuntu-dev-tools
ubuntu-dev-tools \
tox \
wireguard \
$(\
./tools/read-dependencies \
--requirements-file requirements.txt \
--requirements-file test-requirements.txt \
--distro ubuntu \
--system-pkg-names 2> /dev/null \
| tr '\n' ' ' \
)
sudo sbuild-adduser $USER
cp /usr/share/doc/sbuild/examples/example.sbuildrc /home/$USER/.sbuildrc
# Install all build and test dependencies
./tools/read-dependencies -r requirements.txt -r test-requirements.txt -d ubuntu -s -i
- name: Build package
run: |
./packages/bddeb -S -d --release ${{ env.RELEASE }}
sudo -E su $USER -c 'mk-sbuild ${{ env.RELEASE }}'
sudo -E su $USER -c 'DEB_BUILD_OPTIONS=nocheck sbuild --nolog --no-run-lintian --no-run-autopkgtest --verbose --dist=${{ env.RELEASE }} --build-dir=${{ runner.temp }} cloud-init_*.dsc'
- name: Archive debs as artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: 'cloud-init-${{ env.RELEASE }}-deb'
path: '${{ runner.temp }}/cloud-init*.deb'
retention-days: 3

integration-tests:
needs: package-build
runs-on: ubuntu-22.04
steps:
- name: "Checkout"
uses: actions/checkout@v3
with:
# Fetch all tags for tools/read-version
fetch-depth: 0
- name: Retrieve cloud-init package
uses: actions/download-artifact@v3
- name: Setup LXD
uses: canonical/[email protected]
with:
name: 'cloud-init-${{ env.RELEASE }}-deb'
channel: latest/candidate
- name: Verify deb package
run: |
ls -hal cloud-init*.deb
- name: Prepare test tools
run: |
sudo DEBIAN_FRONTEND=noninteractive apt-get -y update
sudo DEBIAN_FRONTEND=noninteractive apt-get -y install tox wireguard
- name: Initialize LXD
ls -hal '${{ runner.temp }}'
echo ${{ runner.temp }}/cloud-init*.deb || true
ls -hal ${{ runner.temp }}/cloud-init*.deb || true
- name: Set up Pycloudlib
run: |
ssh-keygen -P "" -q -f ~/.ssh/id_rsa
echo "[lxd]" > /home/$USER/.config/pycloudlib.toml
sudo adduser $USER lxd
# Jammy GH Action runners have docker installed, which edits iptables
# in a way that is incompatible with lxd.
# https://documentation.ubuntu.com/lxd/en/latest/howto/network_bridge_firewalld/#prevent-connectivity-issues-with-lxd-and-docker
sudo iptables -I DOCKER-USER -j ACCEPT
sudo lxd init --auto
- name: Run integration Tests
run: |
sg lxd -c 'CLOUD_INIT_CLOUD_INIT_SOURCE="$(ls cloud-init*.deb)" tox -e integration-tests-ci'
sh -c 'CLOUD_INIT_CLOUD_INIT_SOURCE="$(ls ${{ runner.temp }}/cloud-init*.deb)" tox -e integration-tests-ci'
6 changes: 3 additions & 3 deletions .github/workflows/linkcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ concurrency:

jobs:
linkcheck:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
continue-on-error: ${{ !(github.event_name == 'workflow_dispatch' && github.event.inputs.failOnError == 'true') }}

steps:
- name: Checkout Repository
uses: actions/checkout@v3.0.0
uses: actions/checkout@v4

- name: "Install Python 3.10"
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10.8'

Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/packaging-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ env:

jobs:
check-patches:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
# Fetch all branches for merging
fetch-depth: 0
Expand All @@ -42,6 +42,7 @@ jobs:
git fetch upstream main
git checkout upstream/main
git merge ${{ github.sha }}
test -f debian/patches/series || echo "no patches, skipping" && exit 0
quilt push -a
tox -e py3
quilt pop -a
8 changes: 4 additions & 4 deletions .github/workflows/scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install dependencies
env:
DEBIAN_FRONTEND: noninteractive
Expand All @@ -29,9 +29,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install Python 3.13-dev
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.13-dev
check-latest: true
Expand All @@ -48,7 +48,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get -qy update
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/stale@v1
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 14
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
check-latest: false
experimental: false
name: Python ${{matrix.python-version}} ${{ matrix.slug }}
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
continue-on-error: ${{ matrix.experimental }}
steps:
- name: "Checkout"
Expand All @@ -37,7 +37,7 @@ jobs:
# Fetch all tags for tools/read-version
fetch-depth: 0
- name: Install Python ${{matrix.python-version}}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{matrix.python-version}}
check-latest: ${{matrix.check-latest}}
Expand Down
6 changes: 1 addition & 5 deletions cloudinit/cmd/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1318,8 +1318,4 @@ def sub_main(args):


if __name__ == "__main__":
if "TZ" not in os.environ:
os.environ["TZ"] = ":/etc/localtime"
return_value = main(sys.argv)
if return_value:
sys.exit(return_value)
sys.exit(main(sys.argv))
4 changes: 2 additions & 2 deletions cloudinit/config/cc_phone_home.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@

LOG = logging.getLogger(__name__)
# phone_home:
# url: http://my.foo.bar/$INSTANCE/
# url: http://my.foo.bar/{{ v1.instance_id }}/
# post: all
# tries: 10
#
# phone_home:
# url: http://my.foo.bar/$INSTANCE_ID/
# url: http://my.foo.bar/{{ v1.instance_id }}/
# post: [ pub_key_rsa, pub_key_ecdsa, instance_id, hostname,
# fqdn ]
#
Expand Down
2 changes: 1 addition & 1 deletion cloudinit/sources/DataSourceEc2.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class DataSourceEc2(sources.DataSource):
]

# Setup read_url parameters per get_url_params.
url_max_wait = 120
url_max_wait = 240
url_timeout = 50

_api_token = None # API token for accessing the metadata service
Expand Down
8 changes: 5 additions & 3 deletions cloudinit/sources/DataSourceScaleway.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,9 +367,11 @@ def network_config(self):
if ip["address"] == self.ephemeral_fixed_address:
ip_cfg["dhcp4"] = True
# Force addition of a route to the metadata API
ip_cfg["routes"] = [
{"to": "169.254.42.42/32", "via": "62.210.0.1"}
]
route = {"to": "169.254.42.42/32", "via": "62.210.0.1"}
if "routes" in ip_cfg.keys():
ip_cfg["routes"] += [route]
else:
ip_cfg["routes"] = [route]
else:
if "addresses" in ip_cfg.keys():
ip_cfg["addresses"] += (
Expand Down
8 changes: 6 additions & 2 deletions cloudinit/sources/DataSourceSmartOS.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
import re
import socket

import serial

from cloudinit import atomic_helper, dmi, sources, subp, util
from cloudinit.event import EventScope, EventType

Expand Down Expand Up @@ -576,6 +574,12 @@ def exists(self):

def open_transport(self):
if self.fp is None:
try:
import serial
except ImportError as e:
raise NotImplementedError(
"serial support is not available"
) from e
ser = serial.Serial(self.device, timeout=self.timeout)
if not ser.isOpen():
raise SystemError("Unable to open %s" % self.device)
Expand Down
4 changes: 2 additions & 2 deletions cloudinit/sources/azure/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from datetime import datetime
from io import StringIO
from typing import Any, Dict, List, Optional, Tuple
from xml.etree import ElementTree # nosec B405
from xml.etree import ElementTree as ET # nosec B405

import requests

Expand Down Expand Up @@ -177,7 +177,7 @@ def __init__(self, message: str) -> None:


class ReportableErrorOvfParsingException(ReportableError):
def __init__(self, *, exception: ElementTree.ParseError) -> None:
def __init__(self, *, exception: ET.ParseError) -> None:
message = exception.msg
super().__init__(f"error parsing ovf-env.xml: {message}")

Expand Down
14 changes: 6 additions & 8 deletions cloudinit/sources/helpers/azure.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from datetime import datetime
from time import sleep, time
from typing import Callable, List, Optional, TypeVar, Union
from xml.etree import ElementTree # nosec B405
from xml.etree import ElementTree as ET # nosec B405
from xml.sax.saxutils import escape # nosec B406

from cloudinit import distros, subp, temp_utils, url_helper, util, version
Expand Down Expand Up @@ -363,8 +363,8 @@ def __init__(
self.azure_endpoint_client = azure_endpoint_client

try:
self.root = ElementTree.fromstring(unparsed_xml) # nosec B314
except ElementTree.ParseError as e:
self.root = ET.fromstring(unparsed_xml) # nosec B314
except ET.ParseError as e:
report_diagnostic_event(
"Failed to parse GoalState XML: %s" % e,
logger_func=LOG.warning,
Expand Down Expand Up @@ -496,9 +496,7 @@ def _decrypt_certs_from_xml(self, certificates_xml):
"""Decrypt the certificates XML document using the our private key;
return the list of certs and private keys contained in the doc.
"""
tag = ElementTree.fromstring(certificates_xml).find( # nosec B314
".//Data"
)
tag = ET.fromstring(certificates_xml).find(".//Data") # nosec B314
certificates_content = tag.text
lines = [
b"MIME-Version: 1.0",
Expand Down Expand Up @@ -1006,8 +1004,8 @@ def parse_text(cls, ovf_env_xml: str) -> "OvfEnvXml":
unparsable or invalid.
"""
try:
root = ElementTree.fromstring(ovf_env_xml) # nosec B314
except ElementTree.ParseError as e:
root = ET.fromstring(ovf_env_xml) # nosec B314
except ET.ParseError as e:
raise errors.ReportableErrorOvfParsingException(exception=e) from e

# If there's no provisioning section, it's not Azure ovf-env.xml.
Expand Down
Loading
Loading