Skip to content

docs: some tutorial issues #661

@TheRealFalcon

Description

@TheRealFalcon

I ran into a few issues while going through the tutorial:

Job yaml in /tmp

The tutorial says to save the file as test-job.yaml, so being a throwaway learning exercise, I put it in /tmp/test-job.yaml. But for some reason, testflinger doesn't like files in /tmp:

/tmp # $ testflinger-cli submit test-job.yaml
ERROR: 2025-04-30 14:41:42 __init__.py:531 -- [Errno 2] No such file or directory: 'test-job.yaml'
Traceback (most recent call last):
  File "/snap/testflinger-cli/201/lib/python3.10/site-packages/testflinger_cli/__init__.py", line 527, in submit
    data = self.args.filename.read_text(
  File "/usr/lib/python3.10/pathlib.py", line 1134, in read_text
    with self.open(mode='r', encoding=encoding, errors=errors) as f:
  File "/usr/lib/python3.10/pathlib.py", line 1119, in open
    return self._accessor.open(self, mode, buffering, encoding, errors,
FileNotFoundError: [Errno 2] No such file or directory: 'test-job.yaml'

Using an absolute path doesn't help:

/tmp # $ testflinger-cli submit /tmp/test-job.yaml
ERROR: 2025-04-30 14:42:43 __init__.py:531 -- [Errno 2] No such file or directory: '/tmp/test-job.yaml'
Traceback (most recent call last):
  File "/snap/testflinger-cli/201/lib/python3.10/site-packages/testflinger_cli/__init__.py", line 527, in submit
    data = self.args.filename.read_text(
  File "/usr/lib/python3.10/pathlib.py", line 1134, in read_text
    with self.open(mode='r', encoding=encoding, errors=errors) as f:
  File "/usr/lib/python3.10/pathlib.py", line 1119, in open
    return self._accessor.open(self, mode, buffering, encoding, errors,
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/test-job.yaml'

Moving the job file out of /tmp fixed it for me, but the tutorial might want to specify putting it in the user's home directory or something like that.

No example queue

Tutorial specifies job_queue: example-queue-1 in the job yaml, but this queue does not exist in the Canonical server. Submitting the job results in:

ERROR: No online agents available for queue example-queue-1. If you want to wait for agents to become available, use the --wait-for-available-agents option.

Taking that advice, I tried the wait option. After realizing the job was in a perpetual wait, I checked the list of queues and realized there is no example-queue-1.

The tutorial should specify a queue that can actually accept jobs.

testflinger vs testflinger-cli

It appears that one is just a symlink to the other, but the tutorial specifies both. I see testflinger-cli most places, but in the check job status section, it uses testflinger.


Reported from: https://canonical-testflinger.readthedocs-hosted.com/en/latest/tutorial/index.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions