[rhinstaller/blivet/pulls/200 rhel7-branch] fcoe: replace fipvlan with fcoemon (#1085325)

vpodzime installerbot-noreply at redhat.com
Tue Aug 11 14:21:43 UTC 2015


> @@ -110,27 +111,69 @@ def addSan(self, nic, dcb=False, auto_vlan=True):
>          log.info("Activating FCoE SAN attached to %s, dcb: %s autovlan: %s",
>                   nic, dcb, auto_vlan)
>  
> -        util.run_program(["ip", "link", "set", nic, "up"])
> -
>          rc = 0
> +        out = ""
> +        timeout = 60
>          error_msg = ""
>          if dcb:
> +
>              self._startLldpad()
> -            util.run_program(["dcbtool", "sc", nic, "dcb", "on"])
> -            util.run_program(["dcbtool", "sc", nic, "app:fcoe",
> -                                                "e:1", "a:1", "w:1"])
> -            rc, out = util.run_program_and_capture_output(["fipvlan", "-c", "-s", "-f",
> -                                               "-fcoe", nic])
> +            while timeout > 0:
> +                rc, out = util.run_program_and_capture_output(
> +                    ["lldptool", "-p"])
> +                if not rc:
> +                    break
> +                log.info("Waiting for lldpad to be ready")
> +                timeout -= 1
> +                time.sleep(1)
> +
> +            while timeout > 0:
> +                rc, out = util.run_program_and_capture_output(
> +                    ["dcbtool", "sc", nic, "dcb", "on"])
> +                if not rc:
> +                    break
> +                log.info("Retrying to turn dcb on")
> +                timeout -= 1
> +                time.sleep(1)
> +
> +            while timeout > 0:
> +                rc, out = util.run_program_and_capture_output(
> +                    ["dcbtool", "sc", nic, "pfc", "e:1", "a:1", "w:1"])
> +                if not rc:
> +                    break
> +                log.info("Retrying to set up dcb with pfc")
> +                timeout -= 1
> +                time.sleep(1)
> +
> +            while timeout > 0:
> +                rc, out = util.run_program_and_capture_output(
> +                    ["dcbtool", "sc", nic, "app:fcoe", "e:1", "a:1", "w:1"])
> +                if not rc:
> +                    break
> +                time.sleep(1)
> +                log.info("Retrying to set up dcb for fcoe")

It wouldn't if you could give it something like a ``remaining`` argument that would tell it how much time is still available. But it would have to return the updated value together with other things which would probably make it too complex. So I'm okay with leaving this as it is.

-- 
To view this pull request on github, visit https://github.com/rhinstaller/blivet/pull/200#discussion_r36749966


More information about the anaconda-patches mailing list