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

setting manual_cache_clean causes warning #3094

Closed
ubuntu-server-builder opened this issue May 11, 2023 · 4 comments
Closed

setting manual_cache_clean causes warning #3094

ubuntu-server-builder opened this issue May 11, 2023 · 4 comments
Labels
launchpad Migrated from Launchpad

Comments

@ubuntu-server-builder
Copy link
Collaborator

This bug was originally filed in Launchpad as LP: #1742479

Launchpad details
affected_projects = ['cloud-init (Ubuntu)']
assignee = None
assignee_name = None
date_closed = 2018-02-22T22:33:32.949892+00:00
date_created = 2018-01-10T16:05:13.654367+00:00
date_fix_committed = 2018-02-22T22:33:32.949892+00:00
date_fix_released = 2018-02-22T22:33:32.949892+00:00
id = 1742479
importance = undecided
is_complete = True
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1742479
milestone = None
owner = smoser
owner_name = Scott Moser
private = False
status = fix_released
submitter = smoser
submitter_name = Scott Moser
tags = ['amd64', 'apport-bug', 'bionic', 'uec-images']
duplicates = []

Launchpad user Scott Moser(smoser) wrote on 2018-01-10T16:05:13.654367+00:00

If manual_cache_clean is set in an instance, then ds-identify will write
'# manual_cache_clean."'
to its config (/run/cloud-init/cloud.cfg).

cloud-init will try to load that file, and will WARN on it not being a dict.

2018-01-10 15:45:57,282 - util.py[WARNING]: Failed loading yaml blob
2018-01-10 15:45:57,283 - util.py[DEBUG]: Failed loading yaml blob
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 898, in load_yaml
(allowed, type_utils.obj_name(converted)))
TypeError: Yaml load allows (<class 'dict'>,) root types, but got NoneType instead

python3 -c 'import yaml; yaml.load("# manual_cache_clean.\n")'
echo "manual_cache_clean: true" > /etc/cloud/cloud.cfg.d/manual.cfg
If you set manual_cache_clean in an instance, then

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: cloud-init 17.2-1-g4089e20c-0ubuntu1
ProcVersionSignature: Ubuntu 4.13.0-17.20-generic 4.13.8
Uname: Linux 4.13.0-17-generic x86_64
ApportVersion: 2.20.8-0ubuntu5
Architecture: amd64
CloudName: NoCloud
Date: Wed Jan 10 15:46:20 2018
PackageArchitecture: all
ProcEnviron:
TERM=xterm-256color
PATH=(custom, no user)
LANG=C.UTF-8
SourcePackage: cloud-init
UpgradeStatus: No upgrade log present (probably fresh install)
user_data.txt:
#cloud-config
{}

@ubuntu-server-builder ubuntu-server-builder added the launchpad Migrated from Launchpad label May 11, 2023
@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Scott Moser(smoser) wrote on 2018-01-10T16:05:13.654367+00:00

Launchpad attachments: NonfreeKernelModules.txt,Dependencies.txt,JournalErrors.txt,ProcCpuinfoMinimal.txt,cloud-init-log-warnings.txt,cloud-init-output.log.txt.txt,logs.tgz.gz,lshw.txt.txt

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Chad Smith(chad.smith) wrote on 2018-01-10T17:40:14.409253+00:00

This is done in ./src/maasserver/compose_preseed.py

    # Prevent the node from requesting cloud-init data on every reboot.
    # This is done so a machine does not need to contact MAAS every time
    # it reboots.
    "manual_cache_clean": True,

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Launchpad Janitor(janitor) wrote on 2018-01-15T16:37:43.045862+00:00

This bug was fixed in the package cloud-init - 17.2-13-g6299e8d0-0ubuntu1


cloud-init (17.2-13-g6299e8d0-0ubuntu1) bionic; urgency=medium

  • New upstream snapshot.
    • Do not log warning on config files that represent None. (LP: #1742479)
    • tests: Use git hash pip dependency format for pylxd. [Chad Smith]
    • tests: add integration requirements text file [Joshua Powers]
    • MAAS: add check_instance_id based off oauth tokens. (LP: #1712680)

-- Scott Moser smoser@ubuntu.com Mon, 15 Jan 2018 10:15:05 -0500

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Scott Moser(smoser) wrote on 2018-02-22T22:33:34.350657+00:00

This bug is believed to be fixed in cloud-init in 18.1. If this is still a problem for you, please make a comment and set the state back to New

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
launchpad Migrated from Launchpad
Projects
None yet
Development

No branches or pull requests

1 participant