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

Add contextual awareness to host creation #208

Merged
merged 3 commits into from
May 1, 2023

Conversation

JacobCallahan
Copy link
Member

@JacobCallahan JacobCallahan commented Apr 18, 2023

This change fixes an issue we're seeing where host entries, missing a hostname and ip, are being reconstructed for checkin. While that shouldn't be an issue during checkin, it would be if used for other purposes.

With that in mind, this adds a check to see if the host is being reconstructed. If so, then it will just debug log instead of raising an error.

Add in some new workarounds and log statements
We're seeing some strange behavior in CI. These are attempts to solve them
and/or get more information about what's going on.

This change fixes an issue we're seeing where host entries, missing a
hostname and ip, are being reconstructed for checkin. While that shouldn't
be an issue during checkin, it would be if used for other purposes.

With that in mind, this adds a check to see if the host is being
reconstructed. If so, then it will just debug log instead of raising an
error.
@JacobCallahan JacobCallahan added the bug Something isn't working label Apr 18, 2023
Some inventory syncs take a long time to complete.
This change adds in a progress bar so users know there is actual
progress and have an estimated completion time.
We're seeing some strang behavior in CI. These are attempts to solve them
and/or get more information about what's going on.
@Griffin-Sullivan
Copy link
Collaborator

What's the best way to test this?

@JacobCallahan
Copy link
Member Author

@Griffin-Sullivan there are a few things in here, but the initial one would be to checkout a host from AAP, null out the hostname and IP (edit the inventory manually), then check it back in.

@Griffin-Sullivan
Copy link
Collaborator

It seems like the checkin is happening just as it normally does. Is that what we want? I'll try again on current latest to see if I get a failure.

Copy link
Collaborator

@Griffin-Sullivan Griffin-Sullivan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I gathered, before checking out this PR I ran a checkout, broker sync, change hostname and ip to null, and then check in. That returns the following error: [ERROR 230501 14:28:38] BrokerError: 'str' object has no attribute 'hostname'. Based off the description I don't know if this is exactly the issue we are trying to fix here, but after running the same steps with this PR installed, I do not get the error.

@JacobCallahan JacobCallahan merged commit 5a807bf into SatelliteQE:master May 1, 2023
4 checks passed
@JacobCallahan JacobCallahan deleted the quick branch May 1, 2023 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants