Skip to content

feat: implement the driver doctor hook - #254

Merged
tas50 merged 1 commit into
mainfrom
feat/doctor-hook
Aug 24, 2026
Merged

feat: implement the driver doctor hook#254
tas50 merged 1 commit into
mainfrom
feat/doctor-hook

Conversation

@tas50

@tas50 tas50 commented Aug 24, 2026

Copy link
Copy Markdown
Member

kitchen doctor had nothing to say for this driver. Two groups of checks, both about failures that currently arrive part way through create.

Credentials. openstack_username, openstack_api_key, and openstack_auth_url are in required_server_settings, but that only means Fog is handed them even when nil — nothing rejects a nil before the request goes out, so a missing password becomes a Keystone rejection mid-create. Each message names the setting and every place it can legitimately come from, since this driver reads three:

openstack_username is not set: set it in kitchen.yml, export OS_USERNAME, or put it in clouds.yaml.

When all three are present, they are actually exercised against Keystone.

Image and flavor selection. create raises on these:

raise(ActionFailed, "Cannot specify both image_ref and image_id") if config[:image_id] && config[:image_ref]
raise(ActionFailed, "Cannot specify both flavor_ref and flavor_id") if config[:flavor_id] && config[:flavor_ref]

doctor reports the same conflicts before the run starts, and also catches the inverse — neither set, which is not currently checked anywhere and fails later and less clearly.

The connectivity check is skipped when credentials are missing: "could not authenticate" stacked on "no password is set" is noise, and there is a test pinning that it stays quiet.

Verification

  • rake test367 examples, 0 failures (360 before; 7 new), rake exit 0
  • cookstyle --chefstyle — 11 files, no offenses
  • yard stats — 100% documented

@tas50
tas50 force-pushed the feat/doctor-hook branch from a26c8d0 to 9d47b6e Compare August 24, 2026 03:03
@tas50
tas50 merged commit 43e2d98 into main Aug 24, 2026
8 checks passed
@tas50
tas50 deleted the feat/doctor-hook branch August 24, 2026 03:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant