Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • lava lava
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 95
    • Issues 95
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 58
    • Merge requests 58
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • lava
  • lavalava
  • Issues
  • #606

Closed
Open
Created Apr 24, 2023 by Tim Jaacks@gftimjaacksContributor

lxc-apt-update/DNS requests fail sometimes

We have a problem where sometimes the lxc-apt-update action fails due to a failing DNS request:

grafik

Everytime this happens, we observe that the LXC got an IPv6 address only:

grafik

To verify that this is correlated, we added a delay to wait for an IPv4 address to the LXC code:

diff --git a/lava_dispatcher/actions/boot/lxc.py.bak b/lava_dispatcher/actions/boot/lxc.py
index 64bcfc2..a0677d7 100644
--- a/lxc.py.bak
+++ b/lxc.py
@@ -177,7 +177,11 @@ class LxcStartAction(Action):
        while True:
            command_output = self.run_command(lxc_cmd, allow_fail=True)
            if command_output:
+                self.logger.debug("'%s' Wait 30 seconds", lxc_name)
+                time.sleep(30)
+                command_output = self.run_command(lxc_cmd, allow_fail=True)
                break
+            self.logger.debug("'%s' Wait 10 seconds before next poll", lxc_name)
            time.sleep(self.sleep)  # poll every 10 seconds.
        self.logger.info("'%s' IP address is: '%s'", lxc_name, command_output.strip())
        return connection

Afterwards the LXC gets IPv4 and IPv6 addresses:

grafik

And the lxc-apt-update action succeeds:

grafik

Is this something anybody else has observed? Can we maybe add some kind of flag to ensure that LXC devices get both an IPv4 and IPv6 address?

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking