Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions sssd_test_framework/hosts/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ def features(self) -> dict[str, bool]:
# enumerate (bool) Feature is only supported for domains with id_provider = ldap or id_provider = proxy.
MANWIDTH=10000 man sssd.conf | grep -q "id_provider = ldap or id_provider = proxy" && \
echo "limited_enumeration" || :
# Check if BEAKER_RECIPE_ID environment variable is set
if [ -n "${BEAKER_RECIPE_ID}" ]; then
Comment on lines +60 to +61
Copy link
Member

Choose a reason for hiding this comment

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

Why?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In IDM-CI, we have two providers one is openstack and other is beaker,
with openstack we get ipv6 adds but those are not configure, we can not ping them from one host to another host, but with beaker all is set for ipv6 adds so currently only IPV6 testing can be done with the system/hosts we get from beaker, so I explicitly add it to check from which provider we are getting the systems.

Copy link
Contributor

Choose a reason for hiding this comment

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

Just to understand - we have ipv6 global addresses in openstack, they just do not work?

IMO the condition should be the other way around then. This way we get ipv6 in beaker and only in beaker. So if I locally set IPv6 virtual network, it will not work, because I do not have this variable set.

Can you think of something that shows we are in openstack and decide by this? Maybe our own variable added trough our openstack yaml?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

okay, is below Pseudocode looks okay, I did not try (getting issue to get beaker systems) but rough idea to implement like this?

FUNCTION DETERMINE_IPV6_FEATURE_STATUS:
    INITIALIZE ipv6_feature_enabled = FALSE

    IF system HAS global IPv6 addresses:
        PRINT "Global IPv6 addresses found."
        IF system CAN ping a known IPv6 target (e.g., Google's DNS or check and ping local IPV6 gateway):
            PRINT "IPv6 connectivity confirmed."
            SET ipv6_feature_enabled = TRUE
        ELSE:
            PRINT "WARNING: IPv6 addresses found, but connectivity failed."
    ELSE:
        PRINT "No global IPv6 addresses found."

    UPDATE application's features dictionary:
        SET "ipv6" feature to ipv6_feature_enabled

END FUNCTION

Copy link
Member

Choose a reason for hiding this comment

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

Yes, that would be much better and more universal. There are several ways, for example:

ping -6 -c 1 google.com
wget --inet6-only -qO- https://redhat.com
..

Downside is that it requires internet connection. Perhaps we could try to ping gateway, not sure as pings can be disabled.

if ip -6 addr show scope global | grep -q "inet6 "; then
echo "ipv6"
fi
fi
""",
log_level=ProcessLogLevel.Error,
)
Expand All @@ -69,6 +75,7 @@ def features(self) -> dict[str, bool]:
"ldap_use_ppolicy": False,
"knownhosts": False,
"limited_enumeration": False,
"ipv6": False,
}

self._features.update({k: True for k in result.stdout_lines})
Expand Down