Uploaded image for project: 'RHEL Conversions'
  1. RHEL Conversions
  2. RHELC-637

Improve the network check in the systeminfo module

XMLWordPrintable

    • False
    • False
    • Hide

      None

      Show
      None
    • 3
    • 2022-Q4

      The current internet connection check we have defined in the system_info.py only checks for the google dns on port 53, and that might not be sufficient for a robust check at all.

      After noticing that some integration tests started failing after running them from the Red Hat Office in Brno, we understood that this specific combination might be blocked by some DNS firewall rule set in the network.

      And thus, on a cabal session, we decided to change it a bit to instead of checking for the Google public DNS, we will actually check for some DNS that we use during the conversion to determinate if the machine has an active internet connection or not.

      Points of contact for this task

      Notes

      • Some questions that may arise when implementing this feature
        • Do we require more than one DNS to actually validate that the internet connection is really up? If not, can we guarantee that with just one DNS, for example, the redhat.com?
        • Should we hardcode the DNS names in the code, or try to read the repo files from the user system?

      Acceptance Criteria

      • Change the current implementation of the internet checking from a socket connection to the Google DNS to make a request to a pre-defined URL, for example: https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi/server/7/7Server/x86_64/os/repodata/repomd.xml
        • Stretch goal: Make a request to all URLs convert2rhel access during the conversion
          • if this stretch goal is not met, create a follow-up Jira issue for that
      • Download and verify the content of the file returned from the pre-defined URL. In the above case, it's an XML file containing some repo information.
      • Log more debug information in the exception handling so that we know what happened during the check (originally RHELC-632)
      • Change the unit test that is already present here.
      • Write an integration test to assert that the code is behaving as expected. We can use dnsmasq to fool the code to think that the DNS is not accessible.

              rolivier@redhat.com Rodolfo Olivieri
              rolivier@redhat.com Rodolfo Olivieri
              Daniel Diblik Daniel Diblik
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: