Skip to content

[BUG] --cloud-only returns false data for some hosts, schedule logic issue #650

@sadsfae

Description

@sadsfae

Summary

  • We have noticed what appears to be a CLI bug and the way the wiki cloud membership differs from --cloud-only output.
  • It appears for at least (2) recent e19 R660 hosts their first schedule is not recognized as active.

These are the hosts to look at, currently released in cloud51

  • e19-h21-000-r660.example.com
  • e19-h22-000-r660.example.com

Details

This environment here cloud51 has 10x hosts evident from both system schedules as well as the wiki:

d41-h11-000-r660.example.com
e19-h07-000-r660.example.com
e19-h21-000-r660.example.com
e19-h22-000-r660.example.com
e19-h23-000-r660.example.com
e19-h25-000-r660.example.com
e19-h26-000-r660.example.com
e20-h02-000-r660.example.com
f25-h16-000-r660.example.com
f25-h18-000-r660.example.com

However --quads--cloud-only --cloud cloud51 only lists 8 of the 10 hosts, even though they have correct schedules.

quads --cloud-only --cloud cloud51 | wc -l
8

Here we can check the hosts we should have listed and count:

d41-h11-000-r660.example.com  = cloud51
e19-h07-000-r660.example.com  = cloud51
e19-h21-000-r660.example.com  = cloud01
e19-h22-000-r660.example.com  = cloud01
e19-h23-000-r660.example.com  = cloud51
e19-h25-000-r660.example.com  = cloud51
e19-h26-000-r660.example.com  = cloud51
e20-h02-000-r660.example.com  = cloud51
f25-h16-000-r660.example.com  = cloud51
f25-h18-000-r660.example.com  = cloud51

Note that 2/10 hosts show cloud01 via --ls-host-cloud however let's look at their current schedules:

for host in e19-h21-000-r660.example.com e19-h22-000-r660.example.com; do quads --ls-schedule --host $host; done
Default cloud: cloud01
Current cloud: cloud01
8060| start=2026-01-18T22:00, end=2026-02-08T22:00, cloud=cloud51
Default cloud: cloud01
Current cloud: cloud01
8061| start=2026-01-18T22:00, end=2026-02-08T22:00, cloud=cloud51

Experimenting further, I tried to cancel a schedule on one of these so they move back to cloud01

quads --shrink --host e19-h21-000-r660.rdu2.scalelab.redhat.com --now
The selected host does not have any active schedules
Would you like to shrink a future allocation of e19-h21-000-r660.example.com? (y/N): y
Traceback (most recent call last):
  File "/usr/bin/quads", line 33, in <module>
    sys.exit(load_entry_point('quads==2.0', 'console_scripts', 'quads')())
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.13/site-packages/quads/cli/main.py", line 64, in main
    _exit_code = qcli.run(
        action=cli_args.get("action"),
        cli_args=cli_args,
    )
  File "/usr/lib/python3.13/site-packages/quads/cli/cli.py", line 67, in run
    exit_code = action_meth()
  File "/usr/lib/python3.13/site-packages/quads/cli/cli.py", line 840, in action_shrink
    if end_date < schedule.start or end_date > schedule.end or (not now and end_date < threshold):
       ^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '<' not supported between instances of 'datetime.datetime' and 'str'

I believe I can "trick" QUADS by modifying the current cloud by setting it''s current assignment_id to active and/or cloud_idto that ofcloud51`but I think this needs to be examined closely in its current error state first.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions