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

Add support to manage ovn-ic services with systemd #65

Closed
wants to merge 2 commits into from

Conversation

odivlad
Copy link
Contributor

@odivlad odivlad commented Dec 9, 2020

This PR adds support to manage ovn-ic daemons with systemd.
Two new .service units are added: ovn-ic.service and ovsdb-server-ic.service.

  • ovn-ic.service systemd-unit manages ovn-ic daemon
  • ovn-ic-db.service systemd-unit manages OVN_IC_Northbound and OVN_IC_Southbound OVSDB server processes.

@numansiddique
Copy link
Collaborator

Thanks for the PR. This is definitely acceptable.

I will take a look hopefully soon.

Thanks

@numansiddique
Copy link
Collaborator

I've submitted this PR as patch series in the mailing list for further review - https://patchwork.ozlabs.org/project/ovn/list/?series=220521

@numansiddique
Copy link
Collaborator

Since ovn-ic needs to connect to OVN NB and SB DBs, user needs to define the connection parms to these DBs using the system file - /etc/systemd/system/ovn-ic.d/local.conf (OVN_IC_OPTS) if ovn-northd service is not runnng in the same machine right ?

@odivlad
Copy link
Contributor Author

odivlad commented Dec 15, 2020

Yes, that's correct. Additionally user may supply OVN_IC_OPTS via /etc/sysconfig/ovn or /etc/sysconfig/ovn-ic.

@numansiddique
Copy link
Collaborator

@odivlad I've been thinking about the systemd service file you added to ovn-ic.

Did you consider making ovn-ic a sub package ? I checked with some of the fedora maintainers.
Although its not a hard rule, but having a subpackage for a service is better.

Would you mind reworking a bit to have a separate ovn-ic sub package ?

Thanks
Numan

@odivlad
Copy link
Contributor Author

odivlad commented Dec 21, 2020

@numansiddique, sure I can do this.
But one thing: if we move ovn-ic and related stuff to sub-package, existing deployments should install ovn-ic package explicitly on upgrade. Is it okay, or, maybe ovn-central package should require ovn-ic for backward compatibility?

@odivlad
Copy link
Contributor Author

odivlad commented Dec 21, 2020

And a second question, is it required to add firewalld xml for ovn ic? I can write config, by I don't use firewalld in my setup, so I can't test it in my env.

@odivlad odivlad force-pushed the ovn-ic branch 2 times, most recently from e391281 to cf6d6ba Compare December 21, 2020 14:17
@odivlad
Copy link
Contributor Author

odivlad commented Dec 21, 2020

@numansiddique, I've updated PR with requested changes.

@odivlad odivlad force-pushed the ovn-ic branch 2 times, most recently from fdc0c9a to 913d852 Compare December 21, 2020 14:37
numansiddique pushed a commit that referenced this pull request Dec 22, 2020
Submitted-at: #65
Signed-off-by: Vladislav Odintsov <odivlad@gmail.com>
Signed-off-by: Numan Siddique <numans@ovn.org>
numansiddique pushed a commit that referenced this pull request Dec 22, 2020
This commit adds new systemd-unit `ovn-ic.service` to manage OVN Interconnection
daemons using systemd.

Submitted-at: #65
Signed-off-by: Vladislav Odintsov <odivlad@gmail.com>
Signed-off-by: Numan Siddique <numans@ovn.org>
@odivlad odivlad force-pushed the ovn-ic branch 5 times, most recently from bae6994 to 8da8799 Compare January 27, 2021 17:24
@odivlad
Copy link
Contributor Author

odivlad commented Jan 27, 2021

@numansiddique, please note that

if we move ovn-ic and related stuff to sub-package, existing deployments should install ovn-ic package explicitly on upgrade. Otherwise ovn-ic will be removed from the host on upgrade. Is it okay, or, maybe ovn-central package should require ovn-ic for backward compatibility?

I see, that commit is already in tree, but just want to double-check before those changes are released.
In my understanding most deployments will install ovn-ic on the central nodes. And technically they can run ovsdb-server-ic on one-two central nodes of each AZ in multi-AZ deployments. Even if they want to deploy global ovsdb on a separate nodes, it's easy to install ovn-central.rpm.
Do we really need a new subpackage?

@numansiddique
Copy link
Collaborator

@numansiddique, please note that

if we move ovn-ic and related stuff to sub-package, existing deployments should install ovn-ic package explicitly on upgrade. Otherwise ovn-ic will be removed from the host on upgrade. Is it okay, or, maybe ovn-central package should require ovn-ic for backward compatibility?

I see, that commit is already in tree, but just want to double-check before those changes are released.
In my understanding most deployments will install ovn-ic on the central nodes. And technically they can run ovsdb-server-ic on one-two central nodes of each AZ in multi-AZ deployments. Even if they want to deploy global ovsdb on a separate nodes, it's easy to install ovn-central.rpm.
Do we really need a new subpackage?

I think we decided on the sub package based on the comment on 17th Dec.

@numansiddique
Copy link
Collaborator

@odivlad I've been thinking about the systemd service file you added to ovn-ic.

Did you consider making ovn-ic a sub package ? I checked with some of the fedora maintainers.
Although its not a hard rule, but having a subpackage for a service is better.

Would you mind reworking a bit to have a separate ovn-ic sub package ?

Thanks
Numan

This one.

rhel/automake.mk Outdated Show resolved Hide resolved
@hzhou8
Copy link
Collaborator

hzhou8 commented Jan 28, 2021

@odivlad I've been thinking about the systemd service file you added to ovn-ic.
Did you consider making ovn-ic a sub package ? I checked with some of the fedora maintainers.
Although its not a hard rule, but having a subpackage for a service is better.
Would you mind reworking a bit to have a separate ovn-ic sub package ?
Thanks
Numan

This one.

@numansiddique So do you think the ovsdb-server-ic (suggested to rename as ovn-ic-db) should be a submodule as well? It requires same components as regular ovsdb but just with IC-DB schemas.

@numansiddique
Copy link
Collaborator

@odivlad I've been thinking about the systemd service file you added to ovn-ic.
Did you consider making ovn-ic a sub package ? I checked with some of the fedora maintainers.
Although its not a hard rule, but having a subpackage for a service is better.
Would you mind reworking a bit to have a separate ovn-ic sub package ?
Thanks
Numan

This one.

@numansiddique So do you think the ovsdb-server-ic (suggested to rename as ovn-ic-db) should be a submodule as well? It requires same components as regular ovsdb but just with IC-DB schemas.

Before the commit 8abe98f ovn spec file was generating the below ovn packages

  • ovn
    • ovn-central
    • ovn-host
    • ovn-vtep

ovn is the main package and others are sub packages. And now with this commit, it generates
- ovn
- ovn-central
- ovn-host
- ovn-vtep
- ovn-ic

ovn-ic was split from ovn-central. I think this is fine.

@numansiddique
Copy link
Collaborator

@numansiddique, sure I can do this.
But one thing: if we move ovn-ic and related stuff to sub-package, existing deployments should install ovn-ic package explicitly on upgrade. Is it okay, or, maybe ovn-central package should require ovn-ic for backward compatibility?

I thought about it when I suggested the change and I also tried out your patch. I think it should be fine as I don't see many users.

Are you ok with this ?

@numansiddique
Copy link
Collaborator

I think having separate package for ic would be better.
User needs to use the systemd service provided by the ovn-ic package on start ovn-ic on central node.
And the user can use the service - ovn-ic-db (added in this PR) to start ovsdb-servers on another node.

@odivlad
Copy link
Contributor Author

odivlad commented Jan 29, 2021

@numansiddique, @hzhou8, thanks for the review. If I correctly understood all comments, I'm doing next:

  1. Rename ovsdb-server-ic.service to ovn-ic-db.service
  2. Leave ovn-ic-db.service systemd-unit incide ovn-ic subpackage.
  3. The Numan's suggestion was that we don't add any special requirements for ovn-ic in ovn-central subpackage. Users who upgrade from previous versions to new code and who run OVN Interconnection, must install manually ovn-ic subpackage on nodes where they run ovn-ic daemon and global ovsdb interconnection servers. Should this be mentioned in NEWS file?
    Honestly, my opinion is that such small change can bring an unneeded headache to users. Are there any cons in adding ovn-ic as a Requires to ovn-central package? This can give backward compatibility, and in the same time users can install ovn-ic on any other then central node. What do you think about it?

@odivlad odivlad force-pushed the ovn-ic branch 2 times, most recently from 7e20ad5 to 8d62255 Compare January 29, 2021 11:17
@odivlad
Copy link
Contributor Author

odivlad commented Jan 29, 2021

I've added fixup commit (with added requires to ovn-central). Let me know if it looks good, I'll squash it and reword with correct commit message.

@numansiddique
Copy link
Collaborator

@numansiddique, @hzhou8, thanks for the review. If I correctly understood all comments, I'm doing next:

  1. Rename ovsdb-server-ic.service to ovn-ic-db.service
  2. Leave ovn-ic-db.service systemd-unit incide ovn-ic subpackage.
  3. The Numan's suggestion was that we don't add any special requirements for ovn-ic in ovn-central subpackage. Users who upgrade from previous versions to new code and who run OVN Interconnection, must install manually ovn-ic subpackage on nodes where they run ovn-ic daemon and global ovsdb interconnection servers. Should this be mentioned in NEWS file?
    Honestly, my opinion is that such small change can bring an unneeded headache to users. Are there any cons in adding ovn-ic as a Requires to ovn-central package? This can give backward compatibility, and in the same time users can install ovn-ic on any other then central node. What do you think about it?

I agree with you that its not a small change. I was just wondering if there are any users who build their own packages.
Normally from what I know, people would consume from either ubuntu, centos, fedora repos.

I looked into the instructions here - https://fedoraproject.org/wiki/Upgrade_paths_%E2%80%94_renaming_or_splitting_packages

I think we need to create compact packages when splitting the packages. I totally missed it earlier. Sorry. I normally study about packaging and the guidelines as and when required.

I'd suggest

  • Revert the patch 8abe98f by moving the ovn-ic related to ovn-central package.
  • Add the systemd files related to ovn-ic and make it part of ovn-central package.

I think we can revisit it later if we really need to split ovn-ic into its own package. What do you think ?

Thanks

@odivlad
Copy link
Contributor Author

odivlad commented Feb 1, 2021

Agree, I'll update PR.

@odivlad odivlad changed the title Add support to manage ovn-ic with systemd Add support to manage ovn-ic services with systemd Feb 1, 2021
@odivlad
Copy link
Contributor Author

odivlad commented Feb 1, 2021

@numansiddique, PR is updated.

@odivlad odivlad force-pushed the ovn-ic branch 2 times, most recently from 051d7a5 to 8ce1253 Compare February 1, 2021 17:00
@numansiddique
Copy link
Collaborator

Thanks. I'll take a look.

Numan

New ovn-ic.service and ovn-ic-db.service systemd units were added
to manage ovn-ic and ovsdb-servers for OVN IC respectively.
ovn-ic-db.service manages both OVN_IC_Northbound and OVN_IC_Southbound
OVSDB server processes.

Signed-off-by: Vladislav Odintsov <odivlad@gmail.com>
@hzhou8
Copy link
Collaborator

hzhou8 commented Feb 3, 2021

LGTM (but I didn't test it)

@numansiddique what's our process for github PR review (v.s. mailing-list patches)

@numansiddique
Copy link
Collaborator

rocess for githu

I normally post the patches myself for review to the ML.

I'm doing it now.

@numansiddique
Copy link
Collaborator

@odivlad Can you please update the first commit with your signed-off-by tag ?

Meanwhile I will add your tag myself and post it to the ovs-dev ML. I hope its fine.

Thanks
Numan

@numansiddique
Copy link
Collaborator

@odivlad
Copy link
Contributor Author

odivlad commented Feb 3, 2021

Meanwhile I will add your tag myself and post it to the ovs-dev ML. I hope its fine.

That's okay, thanks :)

ovsrobot pushed a commit to ovsrobot/ovn that referenced this pull request Feb 3, 2021
…ic."

This reverts commit 8abe98f.

Submitted-at: ovn-org#65
Signed-off-by: Vladislav Odintsov <odivlad@gmail.com>
Signed-off-by: 0-day Robot <robot@bytheb.org>
ovsrobot pushed a commit to ovsrobot/ovn that referenced this pull request Feb 3, 2021
New ovn-ic.service and ovn-ic-db.service systemd units were added
to manage ovn-ic and ovsdb-servers for OVN IC respectively.
ovn-ic-db.service manages both OVN_IC_Northbound and OVN_IC_Southbound
OVSDB server processes.

Submitted-at: ovn-org#65
Signed-off-by: Vladislav Odintsov <odivlad@gmail.com>
Signed-off-by: 0-day Robot <robot@bytheb.org>
numansiddique pushed a commit that referenced this pull request Feb 3, 2021
…ic."

This reverts commit 8abe98f.

Submitted-at: #65
Signed-off-by: Vladislav Odintsov <odivlad@gmail.com>
Signed-off-by: Numan Siddique <numans@ovn.org>
numansiddique pushed a commit that referenced this pull request Feb 3, 2021
New ovn-ic.service and ovn-ic-db.service systemd units were added
to manage ovn-ic and ovsdb-servers for OVN IC respectively.
ovn-ic-db.service manages both OVN_IC_Northbound and OVN_IC_Southbound
OVSDB server processes.

Submitted-at: #65
Signed-off-by: Vladislav Odintsov <odivlad@gmail.com>
Signed-off-by: Numan Siddique <numans@ovn.org>
@numansiddique
Copy link
Collaborator

Thanks for the PR. The patches are applied to the master branch.

@odivlad odivlad deleted the ovn-ic branch February 3, 2021 16:00
odivlad added a commit to odivlad/ovn that referenced this pull request Sep 8, 2021
New ovn-ic.service and ovn-ic-db.service systemd units were added
to manage ovn-ic and ovsdb-servers for OVN IC respectively.
ovn-ic-db.service manages both OVN_IC_Northbound and OVN_IC_Southbound
OVSDB server processes.

Submitted-at: ovn-org#65
Signed-off-by: Vladislav Odintsov <odivlad@gmail.com>
Signed-off-by: Numan Siddique <numans@ovn.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants