1. Unable to allocate IP addresses to nodes – “No Management IP”

Unable to allocate IP addresses to nodes – “No Management IP”

Home Forums FABRIC General Questions and Discussion Unable to allocate IP addresses to nodes – “No Management IP”

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #9142
    Geoff Twardokus
    Participant

      I am having a problem allocating IP addresses to nodes within my FABRIC networks. Specifically, when I try to assign an available IP address to a node, I get an error like “Node client has no valid management IP” where “client” is the name of my node. However, from the slice configuration, I can see the node in question does indeed have an assigned management IP.

      I have repeatedly tried deleting and re-provisioning my slice, but the issue is consistent. I’m a bit stumped because I’ve used identical code in the past and never encountered this issue.

      #9144
      Komal Thareja
      Participant

        Hi Geoff,

        Just to confirm my understanding — your slice is in StableOK state, and the nodes display IP addresses as shown in your screenshot, but node.execute is failing with a “no management IP” error. Is that correct?

        Could you please share your Slice ID here?

        Thanks,
        Komal

        #9146
        Geoff Twardokus
        Participant

          Yes, my slice (8f95cc97-45de-4e5f-97d1-ced2b331936c) is in StableOK state. It is not node.execute that is failing, it is this bit when I try to assign an IP address to the node:

          client_net = slice.get_network(name=”client-net”)
          client_net_avail_ips = client_net.get_available_ips()
          client_interface = client_node.get_interface(network_name=”client-net”)
          client_interface.ip_addr_add(addr=client_net_avail_ips.pop(0), subnet=client_net.get_subnet())

          The last line above produces the below, ending with “Exception: Node client has no valid management IP.”

          #9147
          Komal Thareja
          Participant

            Hi Geoff,

            This appears to be a bug in fablib. As a workaround, could you please modify the call as follows?

            client_interface = client_node.get_interface(network_name="client-net", refresh=True)
            

            This change should prevent the error from occurring. I’ll work on fixing this issue in fablib.

            Best,
            Komal

            #9148
            Geoff Twardokus
            Participant

              Hi Komal – I tried your fix, but I’m unfortunately getting the same error (I deleted and rebuilt the slice just to make sure it was carrying over from before).

              Do you have any other suggestions in the meantime?

              #9149
              Geoff Twardokus
              Participant

                Sorry, to make sure it *wasn’t* carrying over from before.

                #9150
                Geoff Twardokus
                Participant

                  I figured it out! It turns out that when I did this:

                  client_node = slice.add_node(name=”client”, site=site1, image=’default_ubuntu_22′)

                  And then later did this:

                  client_interface = client_node.get_interface(network_name=”client-net”, refresh=True)

                  It had not updated the client node with the IP information from the slice. I needed to reload that node variable before I tried messing with the network interfaces:

                  client_node = slice.get_node(name=”client”)
                  client_net = slice.get_network(name=”client-net”)
                  client_interface = client_node.get_interface(network_name=”client-net”, refresh=True)
                  client_addr = client_net_avail_ips.pop(0)
                  client_interface.ip_addr_add(addr=client_addr, subnet=client_net.get_subnet())

                  Once I added this line, the problem disappeared. So, I guess it’s not a bug in fablib, although it would probably be helpful if there was some warning or something in the documentation about this.

                  Thanks!

                Viewing 7 posts - 1 through 7 (of 7 total)
                • You must be logged in to reply to this topic.