Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set a default csm-api-host #138

Merged
merged 1 commit into from
Sep 8, 2023
Merged

set a default csm-api-host #138

merged 1 commit into from
Sep 8, 2023

Conversation

jacobsalmela
Copy link
Collaborator

@jacobsalmela jacobsalmela commented Sep 7, 2023

Summary and Scope

Fixes a bug where the host was empty and CANI could not initialize a session.

Always sets a host when uses simulation mode. Adjusts tests accordingly

Previous behavior:

% go run main.go alpha session init csm   
1:37PM INF Session is already ACTIVE.
File /Users/jsalmela/.cani/canidb.json already exists. Keep session active but overwrite the datastore: y
2023/09/07 13:37:18 [DEBUG] GET https:///apis/smd/hsm/v2/service/values
2023/09/07 13:37:18 [ERR] GET https:///apis/smd/hsm/v2/service/values request failed: Get "https:///apis/smd/hsm/v2/service/values": http: no Host in request URL
2023/09/07 13:37:18 [DEBUG] GET https:///apis/smd/hsm/v2/service/values: retrying in 1s (4 left)
2023/09/07 13:37:19 [ERR] GET https:///apis/smd/hsm/v2/service/values request failed: Get "https:///apis/smd/hsm/v2/service/values": http: no Host in request URL
2023/09/07 13:37:19 [DEBUG] GET https:///apis/smd/hsm/v2/service/values: retrying in 2s (3 left)

New behavior:

% go run main.go alpha session init csm                                                        
1:38PM INF Session is already ACTIVE.
File /Users/jsalmela/.cani/canidb.json already exists. Keep session active but overwrite the datastore: y
2023/09/07 13:38:21 [DEBUG] GET https://api-gw-service-nmn.local/apis/smd/hsm/v2/service/values

I think there are actually some additional toggles we can enable in terms of flags required/required together

Risks and Mitigations

Low

Signed-off-by: Jacob Salmela <jacob.salmela@hpe.com>
@jacobsalmela jacobsalmela merged commit 6d6dcb5 into main Sep 8, 2023
4 checks passed
@jacobsalmela jacobsalmela deleted the sensible-piledriver branch September 8, 2023 14:02
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.

3 participants