canonical / canonical/cloud-init

cloud-init collect logs needs to defer to distro for debug data

Open
#3,447 2 comments 0 reactions 0 assignees View on GitHub
bug launchpad
Dominant language
Python
Stars
3.8k
Forks
1.1k
Avg merge
2d 23h
Merged PRs (30d)
18

Description

This bug was originally filed in Launchpad as [LP: #1843602](https://bugs.launchpad.net/cloud-init/+bug/1843602)

Launchpad details

affected_projects = []

assignee = None
assignee_name = None
date_closed = None
date_created = 2019-09-11T15:15:39.838265+00:00
date_fix_committed = None
date_fix_released = None
id = 1843602
importance = medium
is_complete = False
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1843602
milestone = None
owner = raharper
owner_name = Ryan Harper
private = False
status = triaged
submitter = raharper
submitter_name = Ryan Harper
tags = []
duplicates = []

_Launchpad user **Ryan Harper(raharper)** wrote on 2019-09-11T15:15:39.838265+00:00_

While triaging a bug in sles'based distro using cloud-init, the collect-logs output had a few issues:

1) the user did not have systemd journal privs

Unexpected error while running command.
Command: ['journalctl', '--boot=0', '-o', 'short-precise']
Exit code: 1
Reason: -
Stdout:
Stderr: Hint: You are currently not seeing messages from other users and the system.
Users in the 'systemd-journal' group can see all messages. Pass -q to
turn off this notice.
No journal files were opened due to insufficient permissions.

2) we tried to collect dpkg-version on a non debian distro

Unexpected error while running command.
Command: ['dpkg-query', '--show', '-f=${Version}\n', 'cloud-init']
Exit code: -
Reason: [Errno 2] No such file or directory
Stdout: -
Stderr: -

3) version file is empty

4) dmesg as non-root user fails

Unexpected error while running command.
Command: ['dmesg']
Exit code: 1
Reason: -
Stdout:
Stderr: dmesg: read kernel buffer failed: Operation not permitted

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.