]> git.proxmox.com Git - ovs.git/commitdiff
ovn: Add ovn db servers ocf script in fedora packager
authorBabu Shanmugam <bschanmu@redhat.com>
Wed, 16 Nov 2016 10:13:10 +0000 (15:43 +0530)
committerAndy Zhou <azhou@ovn.org>
Sat, 19 Nov 2016 07:05:34 +0000 (23:05 -0800)
The OCF script will be present in the ovn-common package and installed
in the openvswitch scripts folder. A symbolic link to this file will
be created in the OCF resources folder.

The OCF resource agent name for this resource is ocf:ovn:ovndb-servers

Signed-off-by: Babu Shanmugam <bschanmu@redhat.com>
Acked-by: Andy Zhou <azhou@ovn.org>
Signed-off-by: Andy Zhou <azhou@ovn.org>
rhel/openvswitch-fedora.spec.in

index 861dac7a587236d8a07c4200cae887e6b3e1eef0..d2cb3cda98d5156fe70b679c35fc73fea429cae2 100644 (file)
@@ -310,6 +310,10 @@ rm -rf $RPM_BUILD_ROOT
     fi
 %endif
 
+%post ovn-common
+mkdir /usr/lib/ocf/resource.d/ovn
+ln -sf %{_datadir}/openvswitch/scripts/ovndb-servers.ocf /usr/lib/ocf/resource.d/ovn/ovndb-servers
+
 %post ovn-central
 %if 0%{?systemd_post:1}
     %systemd_post ovn-northd.service
@@ -350,6 +354,9 @@ rm -rf $RPM_BUILD_ROOT
     /bin/systemctl daemon-reload >/dev/null 2>&1 || :
 %endif
 
+%postun ovn-common
+rm -rf /usr/lib/ocf/resource.d/ovn
+
 %postun ovn-central
 %if 0%{?systemd_postun_with_restart:1}
     %systemd_postun_with_restart ovn-northd.service
@@ -489,6 +496,7 @@ fi
 %{_bindir}/ovn-sbctl
 %{_bindir}/ovn-trace
 %{_datadir}/openvswitch/scripts/ovn-ctl
+%{_datadir}/openvswitch/scripts/ovndb-servers.ocf
 %{_datadir}/openvswitch/scripts/ovn-bugtool-nbctl-show
 %{_datadir}/openvswitch/scripts/ovn-bugtool-sbctl-lflow-list
 %{_datadir}/openvswitch/scripts/ovn-bugtool-sbctl-show