Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ovn-ctl: unable to source ovs-lib #365438

Closed
positiveEV opened this issue Dec 15, 2024 · 3 comments
Closed

ovn-ctl: unable to source ovs-lib #365438

positiveEV opened this issue Dec 15, 2024 · 3 comments
Labels
0.kind: bug Something is broken

Comments

@positiveEV
Copy link
Contributor

Describe the bug

To manage ovn components I decided to create systemd.services based on the ones provided by ovn-central and ovn-host Debian packages, since the ovn does not include any services.
This services use ovn-ctl script to manage services. Line 22 ovn-ctl tries to source ovs-lib at line 22 but it is not able to find it because ovs-lib comes from the openvswitch package

Steps To Reproduce

Simply executing ovn-ctl with whatever valid options

"${pkgs.ovn}/share/ovn/scripts/ovn-ctl start_controller --ovn-manage-ovsdb=no --no-monitor"
root@MYHOST /# nix/store/y3ci49p62gpi34xjla3q8x3pwdlrj14v-ovn-24.09.1/share/ovn/scripts/ovn-ctl start_controller --ovn-manage-ovsdb=no --no-monitor
nix/store/y3ci49p62gpi34xjla3q8x3pwdlrj14v-ovn-24.09.1/share/ovn/scripts/ovn-ctl: line 22: nix/store/y3ci49p62gpi34xjla3q8x3pwdlrj14v-ovn-24.09.1/share/openvswitch/scripts/ovs-lib: No such file or directory

Expected behavior

ovn-ctl should be able to source "${pkgs.openvswitch}/share/openvvswitch/scripts/ovs-lib

Additional context

Two of the 5 systemd services I declared. This is only for non-cluster usage so I did not bother with args

  systemd.services.ovn-central = {
    enable = true;
    description = "Open Virtual Network central components";
    after = [ "network.target" ];
    wants = [ "ovn-northd.service" "ovn-ovsdb-server-sb.service" "ovn-ovsdb-server-nb.service" ];
    unitConfig = {
    };
    serviceConfig = {
      Type = "oneshot";
      ExecStart = "/run/current-system/sw/bin/true";
      ExecStop = "/run/current-system/sw/bin/true";
      RemainAfterExit= "yes";
    };
    wantedBy = [ "multi-user.target" ];
  };

  systemd.services.ovn-northd = {
    enable = true;
    description = "Open Virtual Network central control daemon";
    after = [ "network.target" "ovn-nb-ovsdb.service" "ovn-sb-ovsdb.service" ];
    partOf= [ "ovn-central.service" ];
    unitConfig = {
      DefaultDependencies = "no";
    };
    serviceConfig = {
      Type = "forking";
      ExecStart = "${pkgs.ovn}/share/ovn/scripts/ovn-ctl start_northd --ovn-manage-ovsdb=no --no-monitor";
      ExecStop = "${pkgs.ovn}/share/ovn/scripts/ovn-ctl stop_northd --no-monitor";
      Restart = "on-failure";
      LimitNOFILE = "65535";
      TimeoutStopSec = "15";
    };
  };

Metadata

 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.64, NixOS, 24.11 (Vicuna), 24.11.711150.314e12ba369c`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.24.10`
 - channels(root): `"nixos-24.11"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

@adamcstephens I saw that your are also active on the incus project. Since I am trying to get ovn working to use it with incus, may be you could give me a better way to get ovn running for Incus ?

@positiveEV positiveEV added the 0.kind: bug Something is broken label Dec 15, 2024
@adamcstephens
Copy link
Contributor

adamcstephens commented Dec 17, 2024

Hi, this PR seems to fix that issue #365779

You may have guessed from that behaivor, but nobody is probably using this package. I created it hoping one day we would get full support, but it's a non-trivial module to build that nobody has built yet. I'd be open to reviewing PRs, but I currently have no plans to do more than keep the package alive.

@positiveEV
Copy link
Contributor Author

Thank you for the fix and the info. I will try to make it work on a standalone install if it is not too hard. Otherwise I will probably try Opensuse microos.

@adamcstephens
Copy link
Contributor

I'm going to mark this closed since the reported error is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

No branches or pull requests

2 participants