Cannot find the "/usr/share/ubuntu-scap-security-guides" directory.

Bug #1941924 reported by Ronnie
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-advantage-tools (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

I am trying to run the cis benchmark config. However, I was unable to find the directory "/usr/share/ubuntu-scap-security-guides". On checking the logs, I got a number of errors. Below is the ubuntu advantage log extract.

 File "/usr/lib/python3/dist-packages/uaclient/clouds/identity.py", line 65, in get_cloud_type
    out, _err = util.subp(["cloud-id"])
  File "/usr/lib/python3/dist-packages/uaclient/util.py", line 638, in subp
    out, err = _subp(args, rcs, capture, timeout, env=env)
  File "/usr/lib/python3/dist-packages/uaclient/util.py", line 595, in _subp
    stderr=err.decode("utf-8"),
uaclient.util.ProcessExecutionError: Failed running command 'cloud-id' [exit(1)]. Message: ERROR: File not found '/run/cloud-init/instance-data.json'. Provide a path to instance data json file using --instance-data

2021-08-28 00:12:43,901 - util.py:(419) [DEBUG]: Reading file: /var/lib/ubuntu-advantage/notices.json
2021-08-28 00:12:43,903 - util.py:(686) [DEBUG]: Removing file: /var/lib/ubuntu-advantage/notices.json
2021-08-28 00:21:01,621 - cli.py:(1327) [DEBUG]: Executed with sys.argv: ['/usr/bin/ua', 'auto-attach']
2021-08-28 00:21:01,622 - util.py:(419) [DEBUG]: Reading file: /var/lib/ubuntu-advantage/notices.json
2021-08-28 00:21:01,622 - config.py:(442) [DEBUG]: File does not exist: /var/lib/ubuntu-advantage/notices.json
2021-08-28 00:21:01,622 - util.py:(676) [DEBUG]: Writing file: /var/lib/ubuntu-advantage/notices.json
2021-08-28 00:21:01,623 - util.py:(676) [DEBUG]: Writing file: /var/lib/ubuntu-advantage/private/lock
2021-08-28 00:21:01,624 - util.py:(419) [DEBUG]: Reading file: /var/lib/ubuntu-advantage/notices.json
2021-08-28 00:21:01,626 - config.py:(869) [DEBUG]: Using UA client configuration file at /etc/ubuntu-advantage/uaclient.conf
2021-08-28 00:21:01,626 - util.py:(419) [DEBUG]: Reading file: /etc/ubuntu-advantage/uaclient.conf
2021-08-28 00:21:02,608 - cli.py:(1297) [ERROR]: Unhandled exception, please file a bug
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/uaclient/cli.py", line 1256, in wrapper
    return func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/uaclient/cli.py", line 1342, in main
    return args.action(args, cfg)
  File "/usr/lib/python3/dist-packages/uaclient/cli.py", line 148, in new_f
    return f(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/uaclient/cli.py", line 131, in new_f
    retval = f(args, cfg, **kwargs)
  File "/usr/lib/python3/dist-packages/uaclient/cli.py", line 973, in action_auto_attach
    token = _get_contract_token_from_cloud_identity(cfg)
  File "/usr/lib/python3/dist-packages/uaclient/cli.py", line 928, in _get_contract_token_from_cloud_identity
    instance = identity.cloud_instance_factory()
  File "/usr/lib/python3/dist-packages/uaclient/clouds/identity.py", line 87, in cloud_instance_factory
    cloud_type = get_cloud_type()
  File "/usr/lib/python3/dist-packages/uaclient/config.py", line 940, in new_f
    return f()
  File "/usr/lib/python3/dist-packages/uaclient/clouds/identity.py", line 65, in get_cloud_type
    out, _err = util.subp(["cloud-id"])
  File "/usr/lib/python3/dist-packages/uaclient/util.py", line 638, in subp
    out, err = _subp(args, rcs, capture, timeout, env=env)
  File "/usr/lib/python3/dist-packages/uaclient/util.py", line 595, in _subp
    stderr=err.decode("utf-8"),
uaclient.util.ProcessExecutionError: Failed running command 'cloud-id' [exit(1)]. Message: ERROR: File not found '/run/cloud-init/instance-data.json'. Provide a path to instance data json file using --instance-data

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: ubuntu-advantage-tools 27.2.2~18.04.1
ProcVersionSignature: Microsoft 4.4.0-19041.1151-Microsoft 4.4.35
Uname: Linux 4.4.0-19041-Microsoft x86_64
ApportVersion: 2.20.9-0ubuntu7.24
Architecture: amd64
Date: Sat Aug 28 00:25:00 2021
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 LANG=C.UTF-8
 SHELL=/bin/bash
SourcePackage: ubuntu-advantage-tools
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Ronnie (ronniedroid15) wrote :
Ronnie (ronniedroid15)
description: updated
summary: - Cannot find the /usr/share/ubuntu-scap-security-guides" "directory.
+ Cannot find the "/usr/share/ubuntu-scap-security-guides" directory.
Revision history for this message
Lucas Albuquerque Medeiros de Moura (lamoura) wrote :

Hi Ronnie, just some questions around this issue:

1) Does the following error happened when running: ua enable cis ?
2) What cloud are you running ua on ?
3) What is the output of: cloud-init status --long

Changed in ubuntu-advantage-tools (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for ubuntu-advantage-tools (Ubuntu) because there has been no activity for 60 days.]

Changed in ubuntu-advantage-tools (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.