summaryrefslogtreecommitdiff
path: root/rhel
Commit message (Collapse)AuthorAgeFilesLines
* rhel: don't drop capabilities when running as rootAaron Conole2018-03-272-5/+8
| | | | | | | | | | | | | | | | | | | | | | | Currently, regardless of which user is being set as the running user, Open vSwitch daemons on RHEL systems drop capabilities. This means the very powerful CAP_SYS_ADMIN is dropped, even when the user is 'root'. For the majority of use cases this behavior works, as the user can enable or disable various configurations, regardless of which datapath functions are desired. However, when using certain DPDK PMDs, the enablement and configuration calls require CAP_SYS_ADMIN. Instead of retaining CAP_SYS_ADMIN in all cases, which would practically nullify the uid/gid and privilege drop, we don't pass the --ovs-user option to the daemons. This shunts the capability and privilege dropping code. Reported-by: Marcos Felipe Schwarz <marcos.f.sch@gmail.com> Reported-at: https://mail.openvswitch.org/pipermail/ovs-discuss/2018-January/045955.html Fixes: e3e738a3d058 ("redhat: allow dpdk to also run as non-root user") Signed-off-by: Aaron Conole <aconole@redhat.com> Acked-By: Timothy Redaelli <tredaelli@redhat.com> Signed-off-by: Russell Bryant <russell@ovn.org>
* ovsdb-server: Add support for a built-in _Server database.Ben Pfaff2018-03-242-0/+2
| | | | | | | | | | | | | | | | | | | | | The _Server database is valuable primarily because it provides database clients a way to find out the details of changes to databases, schemas, etc. in a granular, natural way. Until now, the only way that the server could notify clients about these kinds of changes was to close the session; when the client reconnects, it is expected to reassess the server's state. One way to provide this kind of granular information would be to add specific JSON-RPC requests to obtain notifications for different kinds of changes, but since ovsdb-server already provides granular and flexible notification support for databases, using a database for the purpose is convenient and avoids duplicating functionality. Initially this database only reports databases' names and schemas, but when clustering support is added in a later commit it will also report important aspects of clustering and cluster status. Thus, this database also reduces the need to add JSON-RPC calls to retrieve information about new features. Signed-off-by: Ben Pfaff <blp@ovn.org>
* rhel: Avoid losing bridge configuration after adding DPDK portsVishal Deep Ajmera2018-03-072-0/+21
| | | | | | | | | | | | | | | | | Whenever a DPDK port is added to or deleted from an OVS bridge, the bridge interface is reconfigured with the lowest MAC address among the connected DPDK ports. When changing the MAC address, OVS performs a sequences of events UP -> DOWN -> UP on the bridge interface. In deployments of OVS in RHEL distribution this results in loosing Linux networking configuration attached to the bridge interface (e.g. static routes). This patch changes the interface configuration scripts used in a RHEL deployment to trigger post-up operations on the bridge device after a change of MAC address. Signed-off-by: Vishal Deep Ajmera <vishal.deep.ajmera@ericsson.com> Signed-off-by: Flavio Leitner <fbl@sysclose.org> Acked-by: Flavio Leitner <fbl@sysclose.org> Signed-off-by: Russell Bryant <russell@ovn.org>
* selinux: add a new target to build the policyAaron Conole2018-02-232-6/+2
| | | | | | | | | | | | | | | | | | The selinux policy currently builds manually, as a process that either the user or distribution maintainer undertakes. That process consists of: 1. Convert the intermediary files into their file form through 'make' statements at the top level. 2. Change to the selinux directory and issue the selinux "make -f" directive. This commit introduces a new target 'selinux-policy' which builds the openvswitch-custom policy files. Signed-off-by: Aaron Conole <aconole@redhat.com> Acked-by: Ansis Atteka <aatteka@ovn.org>
* rhel: Ensure proper OVS kernel modules load - rhel6Greg Rose2018-01-171-0/+25
| | | | | | | | | | | | Patch c49889cf3e "rhel: Ensure proper OVS kernel modules load after upgrade" did not address the RHEL 6 kmod rpm spec file. This patch addresses that error. Fixes: c49889cf3e ("rhel: Ensure proper OVS kernel modules...") CC: Ansis Atteka <ansisatteka@gmail.com> CC: Flavio Leitner <fbl@sysclose.org> Signed-off-by: Greg Rose <gvrose8192@gmail.com> Acked-by: Ansis Atteka <aatteka@ovn.org>
* rhel: Add the new ovsdb manpages to %files list (also for RHEL)Ansis Atteka2018-01-161-0/+3
| | | | | | | | | | | | | | | Currently, "rpmbuild -bb rhel/openvswitch.spec" doesn't work correctly since the new ovsdb manpages (ovsdb.5, ovsdb.7 and ovsdb-server.7) were added. This patch adds the new ovsdb manpages in the %files list in the spec file. CC: Ben Pfaff <blp@ovn.org> Fixes: 12b84d50e032 ("ovsdb: Improve documentation.") Signed-off-by: Ansis Atteka <aatteka@ovn.org> Tested-by: Greg Rose <gvrose8192@gmail.com> Reviewed-by: Greg Rose <gvrose8192@gmail.com>
* rhel: add missing mandatory build dependenciesAnsis Atteka2018-01-161-0/+2
| | | | | | | | | | | autoconf, automake and libtool are required for ./boot.sh. python-sphinx is required to prevent an error where ovs-test.8 is otherwise not generated. Signed-off-by: Ansis Atteka <aatteka@ovn.org> Tested-by: Greg Rose <gvrose8192@gmail.com> Reviewed-by: Greg Rose <gvrose8192@gmail.com>
* rhel: Ensure proper OVS kernel modules load after upgradeGreg Rose2018-01-161-1/+22
| | | | | | | | | | | | | Add post install and post un-install scripts to make sure that the openvswitch kernel modules are correctly written with the weak-modules utility. This ensures that after an upgrade to a newer kernel the correct openvswitch kernel modules from a previous installation will be found by the depmod search path. Suggested-by: Flavio Leitner <fbl@sysclose.org> Signed-off-by: Greg Rose <gvrose8192@gmail.com> Acked-by: Ansis Atteka <aatteka@ovn.org> Acked-by: Flavio Leitner <fbl@sysclose.org>
* rhel: add "force-reload-kmod" support in "ovs-systemd-reload"Timothy Redaelli2018-01-081-1/+5
| | | | | | | | | | | Since you can't use "ovs-ctl force-reload-kmod" on Fedora/RHEL, due to systemd dependencies, this commit adds the "force-reload-kmod" feature on ovs-systemd-reload. Signed-off-by: Timothy Redaelli <tredaelli@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org> Tested-by: Greg Rose <gvrose8192@gmail.com> Reviewed-by: Greg Rose <gvrose8192@gmail.com>
* rhel: use the functions in ovs-lib.in in ovs-systemd-reloadTimothy Redaelli2018-01-081-14/+23
| | | | | | | | | To avoid code duplication use the functions from ovs-lib.in Signed-off-by: Timothy Redaelli <tredaelli@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org> Tested-by: Greg Rose <gvrose8192@gmail.com> Reviewed-by: Greg Rose <gvrose8192@gmail.com>
* rhel: Add the new ovsdb manpages to %files listTimothy Redaelli2017-12-151-0/+3
| | | | | | | | | | | | | Currently, "make rpm-fedora" doesn't work correctly since the new ovsdb manpages (ovsdb.5, ovsdb.7 and ovsdb-server.7) were added. This patch adds the new ovsdb manpages in the %files list in the spec file. CC: Ben Pfaff <blp@ovn.org> Fixes: 12b84d50e032 ("ovsdb: Improve documentation.") Signed-off-by: Timothy Redaelli <tredaelli@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* redhat: Create /etc/openvswitch/* with openvswitch as user/groupTimothy Redaelli2017-11-291-3/+4
| | | | | | | | | | | | | | | | | | | | Without this commit is not possible to upgrade an openvswitch release that includes the commit ac416a3ab2d2 (for example 2.8.0) with another release that includes the commit ac416a3ab2d2 (for example master or 2.8.1), because rpm changes the user/group of /etc/openvswitch to root/root, but ovsdb-server starts with the user openvswitch and so it doesn't have permissions to write in /etc/openvswitch/conf.db. This patch tell rpm to use the openvswitch user and group for /etc/openvswitch and /etc/openvswitch/default.conf. Reported-by: Mark Michelson <mmichels@redhat.com> CC: aaron conole <aconole@redhat.com> Fixes: ac416a3ab2d2 ("redhat: dynamically allocate and reference ovs user") Signed-off-by: Timothy Redaelli <tredaelli@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Aaron Conole <aconole@redhat.com> Tested-by: Mark Michelson <mmichels@redhat.com>
* OpenvSwitch logrotate: Use ctl file path as target in ovs-appctl to reset logsNuman Siddique2017-11-261-2/+2
| | | | | | | | | | | | | Presently, logrotate script, searches for the pid files in /var/log/openvswitch and passes the pid file name (without .pid) as target to ovs-appctl. This approach doesn't work for OVN DB servers since the ctl files are generated as "ovnnb_db.ctl" and "ovnsb_db.ctl". So search for the .ctl files instead and use them as target to ovs-appctl. Suggested-by: Ben Pfaff <blp@ovn.org> Signed-off-by: Numan Siddique <nusiddiq@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Mark Michelson <mmichels@redhat.com>
* tests: Convert dpdkstrip utility from Perl to Python.Ben Pfaff2017-11-261-1/+1
| | | | | | | | Perl is unfashionable and Python is more widely available and understood, so this commit converts one of the OVS uses of Perl into Python. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Aaron Conole <aconole@redhat.com>
* rhel: Add support for "systemctl reload openvswitch"Timothy Redaelli2017-11-085-2/+43
| | | | | | | | | | | | | | | | | The reload procedure will trigger a script that saves the flows and tlv maps (using ovs-save) then it restarts ovsdb-server, it stops ovs-vswitchd, it sets other_config:flow-restore-wait=true (to wait till flow restore is finished), it starts ovs-vswitchd, it restore the backupped flows/tlv maps and it removes other_config:flow-restore-wait=true (logic mostly ripped from ovs-ctl). It uses systemctl with --job-mode=ignore-dependencies to restart ovsdb-server and stop and start ovs-vswitchd in order to avoid systemd to restart the other components due to dependencies (as explained in rhel/README.RHEL.rst). Signed-off-by: Timothy Redaelli <tredaelli@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Flavio Leitner <fbl@sysclose.org>
* rhel: Use python2-sphinx as BuildRequires on FedoraTimothy Redaelli2017-10-301-1/+1
| | | | | | | | | | | python-* package names are deprecated on Fedora (https://fedoraproject.org/wiki/Packaging:Naming#Python2_binary_package_naming) so use python2-sphinx, when available, instead. CC: Lance Richardson <lrichard@redhat.com> Fixes: cd6121410b52 ("rhel: add python-sphinx as a build dependency") Signed-off-by: Timothy Redaelli <tredaelli@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* rhel: Add systemd support to delete transient ports only on bootTimothy Redaelli2017-10-274-1/+14
| | | | | | | | | | Using the dependencies feature of systemd ovs-delete-transient-ports.service is only started once and so transient ports are only deleted only the first time after boot. Acked-by: Aaron Conole <aconole@redhat.com> Signed-off-by: Timothy Redaelli <tredaelli@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* rhel: fix log directory permissionsAaron Conole2017-10-181-1/+1
| | | | | | | | | | | | | | | | | When the logrotate script runs, and Open vSwitch is running as a non-root user, the /var/log/openvswitch directory doesn't have other rx bits set. This means the reopen attempt will fail with "permission denied", even though the default logrotate configuration creates a new log file with the appropriate attributes. This change sets the r/x bits for other on /var/log/openvswitch Signed-off-by: Aaron Conole <aconole@redhat.com> Tested-by: Jean Hsiao <jhsiao@redhat.com> Acked-by: Flavio Leitner <fbl@sysclose.org> Acked-by: Markos Chandras <mchandras@suse.de> Acked-by: Timothy Redaelli <tredaelli@redhat.com> Signed-off-by: Russell Bryant <russell@ovn.org>
* rhel: Skip systemctl redirect.Gurucharan Shetty2017-10-061-0/+2
| | | | | | | | | | | | | | | We still use SysV scripts for RHEL. Currently, invoking /etc/init.d/openvswitch will redirect the calls to dynamically generated systemd scripts. In the above case when you call "/etc/init.d/openvswitch-switch start", it inturn calls "/bin/systemctl start openvswitch-switch.service" and that inturn again calls "/etc/init.d/openvswitch-switch start" This patch avoids it. This is similar to what was done to Debian in commit 873d85653d8 (debian: Skip systemctl redirect.) Signed-off-by: Gurucharan Shetty <guru@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* centos: fix selinux intermediate fileAaron Conole2017-09-011-0/+1
| | | | | | | | | | | | The commit 7bc1aae71e89 ("rhel: make the selinux policy intermediate") broke the centos RPM builds. This commit ensures that the centos rpmbuild will first create the openvswitch-custom.te file, and then create the final policy files. Fixes: 7bc1aae71e89 ("rhel: make the selinux policy intermediate") Reported-by: Ansis Atteka <aatteka@ovn.org> Signed-off-by: Aaron Conole <aconole@redhat.com> Acked-by: Ansis Atteka <aatteka@ovn.org>
* rhel: make the selinux policy intermediateAaron Conole2017-08-311-0/+1
| | | | | | | | | | | This will be used by an upcoming commit to have @begin_ and @end_ dpdk blocks to keep dpdk specific policy decisions only active when dpdk is used. Acked-by: Flavio Leitner <fbl@sysclose.org> Acked-by: Ansis Atteka <aatteka@ovn.org> Signed-off-by: Aaron Conole <aconole@redhat.com> Tested-by: Jean Hsiao <jhsiao@redhat.com>
* redhat: fix upgrades where group doesn't existAaron Conole2017-08-301-2/+2
| | | | | | | | | | | | | | | | | | The upgrade from older Open vSwitch versions on RHEL will try, as much as possible, to preserve the system. This means no new users or groups are created. As an effect, it's possible for the chown to fail, because the hugetlbfs group may not exist. While it did on my systems, it was not there on others. This change allows the ExecStartPre commands to fail. In the case that the user doesn't use DPDK, it won't matter anyway. Fixes: e3e738a3d058 ('redhat: allow dpdk to also run as non-root user') Signed-off-by: Aaron Conole <aconole@redhat.com> Reported-by: Jean-Tsung Hsiao <jhsiao@redhat.com> Tested-by: Jean-Tsung Hsiao <jhsiao@redhat.com> Acked-by: Flavio Leitner <fbl@sysclose.org> Signed-off-by: Russell Bryant <russell@ovn.org>
* redhat: add vfio udev rulesaaron conole2017-08-103-0/+10
| | | | | | | | | This commit builds on the non-root ovs work and adds a udev rule which will automatically set the group permissions of vfio devices. Fixes: e3e738a3d058 ("redhat: allow dpdk to also run as non-root user") Signed-off-by: Aaron Conole <aconole@redhat.com> Signed-off-by: Russell Bryant <russell@ovn.org>
* redhat: allow dpdk to also run as non-root useraaron conole2017-08-083-0/+29
| | | | | | | | | | | | | | | | | | | | After this commit, users may start a dpdk-enabled ovs setup as a non-root user. This is accomplished by exporting the $HOME directory, which dpdk uses to fill in it's semi-persistent RTE configuration. This change may be a bit controversial since it modifies /dev/hugepages as part of starting the ovs-vswitchd to set a hugetlbfs group ownership. This is used to enable writing to /dev/hugepages so that the dpdk_init will successfully complete. There is an alternate way of accomplishing this - namely to initialize DPDK before dropping privileges. However, this would mean that if DPDK ever grows an uninit / reinit function, non-root ovs likely could never use it. This does not change OvS+DPDK's SELinux requirements. It still must be disabled. Signed-off-by: Aaron Conole <aconole@redhat.com> Signed-off-by: Russell Bryant <russell@ovn.org>
* redhat: dynamic service file for vswitchdaaron conole2017-08-084-1/+13
| | | | | | | | | This commit changes the service file from static configuration to an autogenerated file, produced during the build. This will be relevant in a future commit. Signed-off-by: Aaron Conole <aconole@redhat.com> Signed-off-by: Russell Bryant <russell@ovn.org>
* redhat: dynamically allocate and reference ovs useraaron conole2017-08-082-0/+14
| | | | | | | | | | | | | | | After this commit, the fedora RPM will create the openvswitch user, from the non-static pool, for use as an Open vSwitch daemon user. This only happens on install - not upgrade. This will be the default user:group combination for the openvswitch daemons. To do this in a way that doesn't impact existing installations, the /etc/openvswitch directory will be created during the installation, rather than being provided as part of the rpm. Acked-by: Markos Chandras <mchandras@suse.de> Signed-off-by: Aaron Conole <aconole@redhat.com> Signed-off-by: Russell Bryant <russell@ovn.org>
* redhat: allow arbitrary user:groupaaron conole2017-08-086-0/+19
| | | | | | | | | | | | | Under rpm based distributions, the only user:group that the rhel daemons run as is 'root:root'. This is fine as a default, but as part of a security procedure, users may want to run as an alternate uid/gid. This commit adds an OVS_USER_ID environment variable for systemd, which defaults to root:root, but can be overridden by changing the /etc/sysconfig/openvswitch environment file. Acked-by: Markos Chandras <mchandras@suse.de> Signed-off-by: Aaron Conole <aconole@redhat.com> Signed-off-by: Russell Bryant <russell@ovn.org>
* rhel: Use systemd Restart option for ovn-controllers.Mark Michelson2017-08-032-3/+5
| | | | | | | | | | | | | | | | This change stops the use of OVS's monitor for the ovn-controller and ovn-controller-vtep systemd services. Instead, the services use the systemd Restart option to restart the services automatically if they fail. This patch changes the ovn-controller service Type from "oneshot" to "forking". The Restart option is incompatible with oneshot services. The patch does not change the ovn-controller-vtep service type from "simple", however. Signed-off-by: Mark Michelson <mmichels@redhat.com> Acked-by: Lance Richardson <lrichard@redhat.com> Signed-off-by: Russell Bryant <russell@ovn.org>
* Update relevant artifacts to add support for DPDK 17.05.1.Michal Weglicki2017-08-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Upgrading to DPDK 17.05.1 stable release adds new significant features relevant to OVS, including, but not limited to: - tun/tap PMD, - VFIO hotplug support, - Generic flow API. Following changes are applied: - netdev-dpdk: Changes required by DPDK API modifications. - doc: Because of DPDK API changes, backward compatibility with previous DPDK releases will be broken, thus all relevant documentation entries are updated. - .travis: DPDK version change from 16.11.1 to 17.05.1. - rhel/openvswitch-fedora.spec.in: DPDK version change from 16.11 to 17.05.1 Signed-off-by: Michal Weglicki <michalx.weglicki@intel.com> Acked-by: Kevin Traynor <ktraynor@redhat.com> Acked-by: Mark Kavanagh <mark.b.kavanagh@intel.com> Tested-by: Ian Stokes <ian.stokes@intel.com> Acked-by: Aaron Conole <aconole@redhat.com> Signed-off-by: Darrell Ball <dlu998@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* rhel: Fix typo in README.RHEL.rstTimothy Redaelli2017-08-011-1/+1
| | | | | | | Replace systemctk with systemctl Signed-off-by: Timothy Redaelli <tredaelli@redhat.com> Signed-off-by: Russell Bryant <russell@ovn.org>
* rhel/systemd: Set ovs-vswitchd timeout to 5 minutesaaron conole2017-07-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | During initialization, it's possible that the startup time takes longer than the systemd default provided. Set this to be 5 minutes. If we take longer than 5 minutes, maybe something is wrong. As an example of long initialization, enable DPDK, and allocate large numbers of hugepages before starting ovs-vswitchd. The vswitchd can take two or more minutes to start. During that time, systemd will decide that the startup time took too long, and kill the parent process, leading eventually to an error like: ovs|00011|daemon_unix|EMER|pipe write failed (Broken pipe) And a systemd log like: ovs-vswitchd.service start operation timed out. Terminating. The 5 minutes setting has been observed to work on a system where 400G of hugepages were allocated. Signed-off-by: Aaron Conole <aconole@redhat.com> Acked-by: Markos Chandras <mchandras@suse.de> Acked-by: Timothy Redaelli <tredaelli@redhat.com> Signed-off-by: Russell Bryant <russell@ovn.org>
* rhel: Fix creation of symlink for ocf scriptTimothy Redaelli2017-07-201-10/+5
| | | | | | | | | | | | | | | | | | | | | The policy is to use %files to track installed files. If %files is not used the resulting file is not owned by any package. Before this commit: # rpm -qf /usr/lib/ocf/resource.d/ovn/ovndb-servers file /usr/lib/ocf/resource.d/ovn/ovndb-servers is not owned by any package After this commit: # rpm -qf /usr/lib/ocf/resource.d/ovn/ovndb-servers openvswitch-ovn-common-2.7.90-1.fc26.x86_64 Fixes: a4245b7869c8 ("ovn: Add ovn db servers ocf script in fedora packager") Signed-off-by: Timothy Redaelli <tredaelli@redhat.com> Acked-by: Aaron Conole <aconole@redhat.com> Acked-by: Numan Siddique <nusiddiq@redhat.com> Signed-off-by: Russell Bryant <russell@ovn.org>
* make logs not readable by otherTimothy Redaelli2017-07-101-1/+1
| | | | | | | | | | | The Open vSwitch log directory and files are currently set world readable. However, since only Open vSwitch users and processes need to access this directory and these files there is no need to allow the world to access them, since it can result in the exposure of sensitive information. Signed-off-by: Timothy Redaelli <tredaelli@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* rhel-systemd: start vswitchd after udevaaron conole2017-06-291-1/+1
| | | | | | | | | | | | | | | | It's possible to race with the udev service, such that dpdk ports are not finished being bound until after ovs-vswitchd has been started. This means that attempts to use the port will fail. While it is possible to work around this for some NICs using port hotplug, not all port types are supported (for instance vfio), and it requires manual intervention. Fixes: 36af136b690c ("rhel-systemd: Delay shutting down the services") Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=1397299 Suggested-by: Flavio Leitner <fbl@sysclose.org> Signed-off-by: Aaron Conole <aconole@redhat.com> Tested-by: Karthik Sundaravel <ksundara@redhat.com> Signed-off-by: Russell Bryant <russell@ovn.org>
* redhat: make the rpm aware of the lock fileAaron Conole2017-06-131-0/+2
| | | | | | | | | | | | | | Currently, the db lockfile will cause the openvswitch directory to linger after uninstall because the rpm database isn't aware that it should be treated as part of the system. This commit informs the rpmdb properly as a 'ghost' so that when the package is uninstalled, it will be removed automatically. This means that if no extra files exist in /etc/openvswitch, the whole directory will be removed from /etc/. Acked-by: Flavio Leitner <fbl@sysclose.org> Reviewed-by: Markos Chandras <mchandra@suse.de> Signed-off-by: Aaron Conole <aconole@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* rhel: install firewalld ovn files with chmod 644 instead of 755Timothy Redaelli2017-05-311-2/+2
| | | | | | | Fixes: 55f36be59122 ("rhel: Firewall service files for OVN.") Signed-off-by: Timothy Redaelli <tredaelli@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Miguel Angel Ajo <majopela@redhat.com>
* rhel: Fix openvswitch.spec install.Joe Stringer2017-05-181-1/+3
| | | | | | | | | | | | | | | This is the equivalent change of 2f4f43bfddfd ("rhel: fix the fedora spec") for the regular openvswitch.spec. From that patch: When commit d0c961a99f57 ("lib/automake.mk: don't install runtime directories") landed, it broke RPM based builds since the requisite directories were no longer available. This commit adds those directories back when making RPMs so that the packagemanager can see them. Fixes: d0c961a99f57 ("lib/automake.mk: don't install runtime directories") Signed-off-by: Joe Stringer <joe@ovn.org> Acked-by: Greg Rose <gvrose8192@gmail.com>
* fedora: do not restart ovn svcs automatically on pkg upgradeLance Richardson2017-05-021-18/+6
| | | | | | | | | | | | | | Similar to commit 5771f4765734 ("fedora: do not restart the service on a pkg upgrade"), this change eliminates the automatic restart of OVN services after upgrade. Note that the post-uninstall scriptlet affected by this change is executed from the previously installed package when upgrading, so existing installations need to go through two package upgrades before this change will take effect. Signed-off-by: Lance Richardson <lrichard@redhat.com> Signed-off-by: Russell Bryant <rbryant@redhat.com>
* build: Don't run tests in rpm makefile targets.Russell Bryant2017-05-021-0/+1
| | | | | | | | | | | | The RPM build makefile targets are helpful during development and testing, but I personally almost never want the tests to run when I use them. Leave tests on by default in the spec file for when the package is built by distro build systems, but disable it by default in the Makefile targets and update the documentation accordingly. Signed-off-by: Russell Bryant <russell@ovn.org> Acked-by: Lance Richardson <lrichard@redhat.com> Acked-by: Aaron Conole <aconole@redhat.com>
* rhel: fix the fedora specAaron Conole2017-05-021-0/+2
| | | | | | | | | | | | | | When commit d0c961a99f57 ("lib/automake.mk: don't install runtime directories") landed, it broke RPM based builds since the requisite directories were no longer available. This commit adds those directories back when making RPMs so that the package manager can see them. Fixes: d0c961a99f57 ("lib/automake.mk: don't install runtime directories") Reported-by: Lance Richardson <lrichard@redhat.com> Tested-by: Lance Richardson <lrichard@redhat.com> Signed-off-by: Aaron Conole <aconole@redhat.com> Signed-off-by: Russell Bryant <rbryant@redhat.com>
* rhel: add python-sphinx as a build dependencyLance Richardson2017-04-281-0/+1
| | | | | | | | | | | The python-sphinx package is now required in order to build man pages, add this package as a build requirement. Reported-by: Leif Madsen <lmadsen@redhat.com> Signed-off-by: Lance Richardson <lrichard@redhat.com> Acked-By: Leif Madsen <lmadsen@redhat.com> Tested-By: Leif Madsen <lmadsen@redhat.com> Signed-off-by: Russell Bryant <rbryant@redhat.com>
* ovn-detrace: Add ovn-detrace to fedora rpm package.Guoshuai Li2017-04-241-0/+2
| | | | | | | | | | Otherwise, through the "make rpm-fedora" build fedora package will be error: error: Installed (but unpackaged) file(s) found: /usr/bin/ovn-detrace /usr/share/man/man1/ovn-detrace.1.gz Signed-off-by: Guoshuai Li <ligs@dtdream.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* rhel: Avoid logrotate error if /var/run/openvswitch does not existTimothy Redaelli2017-04-131-3/+5
| | | | | | | | | Avoid also errors if an ovs server didn't start correctly or it crashed without deleting the pid file. Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=1441524 Signed-off-by: Timothy Redaelli <tredaelli@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* rhel/etc_logrotate.d_openvswitch: Fix coding styleTimothy Redaelli2017-04-131-7/+7
| | | | | | | | Replace tabs by 4 spaces and indent the postrotate script like the examples in 'man logrotate.conf' Signed-off-by: Timothy Redaelli <tredaelli@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* rhel: Use correct default port for OVN SB databaseLance Richardson2017-03-081-1/+1
| | | | | | | | Fix typo in OVN SB database TCP port number. Fixes: commit 55f36be59122 ("rhel: Firewall service files for OVN.") Signed-off-by: Lance Richardson <lrichard@redhat.com> Signed-off-by: Russell Bryant <russell@ovn.org>
* packaging: Make Fedora spec file CentOS compatibleLeif Madsen2017-03-081-15/+39
| | | | | | | | | | | On CentOS, the package names aren't prefixed with python2, but rather are prefixed with simply python. This change addresses that and fixes up some documentation that was outdated, and updates the Vagrantfile to use the proper spec file and package names. Fixes: bb1a7ca21107 ("fedora: Add python3-openvswitch split package") Signed-off-by: Leif Madsen <lmadsen@redhat.com> Signed-off-by: Russell Bryant <russell@ovn.org>
* rhel: remove duplicate line from rhel/automake.mkLance Richardson2017-03-031-1/+0
| | | | | | Fixes: commit 55f36be59122 ("rhel: Firewall service files for OVN.") Signed-off-by: Lance Richardson <lrichard@redhat.com> Signed-off-by: Joe Stringer <joe@ovn.org>
* rhel-systemd: Document systemd behaviorEelco Chaudron2017-02-271-0/+32
| | | | | | | | | | This is a follow up patch to document the systemd behavior including the change introduced by the "rhel-systemd: Restart openvswitch service if a daemon crashes", still under review. Signed-off-by: Eelco Chaudron <echaudro@redhat.com> Acked-by: Flavio Leitner <fbl@sysclose.org> Signed-off-by: Russell Bryant <russell@ovn.org>
* rhel-systemd: Restart openvswitch service if a daemon crashesEelco Chaudron2017-02-273-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently if either ovsdb-server or ovs-vswitchd is crashing the daemon is not restarting leaving the system in faulty state. This patch will detect the daemon crash and will restart the openvswitch service. Here is a (bit to wide) table showing the behavior before and after the patch. Note that only the Crash behavior has changed: Before patch: | Process Status | systemctl <> status | | ovs-vswitchd | ovsdb-server | openvswitch | ovs-vswitchd | ovsdb-server | +--------------+--------------+--------------+--------------+--------------+ systemctl start openvswitch* | started | started |active,exited |active,running|active,running| Crash vswitchd | crashed | stopped |inactive, dead|failed |inactive,dead | Crash ovsdb | stopped | crashed |inactive, dead|inactive,dead |failed | systemctl restart openvswitch | re-started | re-started |active,exited |active,running|active,running| systemctl restart ovs-vswitchd | re-started | re-started |active,exited |active,running|active,running| systemctl restart ovsdb-server | re-started | re-started |active,exited |active,running|active,running| systemctl stop openvswitch | stopped | stopped |inactive, dead|inactive,dead |inactive,dead | systemctl stop ovs-vswitchd | stopped | stopped |inactive, dead|inactive,dead |inactive,dead | systemctl stop ovsdb-server | stopped | stopped |inactive, dead|inactive,dead |inactive,dead | systemctl start ovs-vswitchd* | started | started |inactive, dead|active,running|active,running| systemctl start ovsdb-server* | not started | started |inactive, dead|inactive, dead|active,running| With patch: | Process Status | systemctk <> status | | ovs-vswitchd | ovsdb-server | openvswitch | ovs-vswitchd | ovsdb-server | +--------------+--------------+--------------+--------------+--------------+ systemctl start openvswitch* | started | started |active,exited |active,running|active,running| Crash vswitchd | crash,started| re-started |active,exited |active,running|active,running| Crash ovsdb | re-started | crash,started|active,exited |active,running|active,running| systemctl restart openvswitch | re-started | re-started |active,exited |active,running|active,running| systemctl restart ovs-vswitchd | re-started | re-started |active,exited |active,running|active,running| systemctl restart ovsdb-server | re-started | re-started |active,exited |active,running|active,running| systemctl stop openvswitch | stopped | stopped |inactive, dead|inactive,dead |inactive,dead | systemctl stop ovs-vswitchd | stopped | stopped |inactive, dead|inactive,dead |inactive,dead | systemctl stop ovsdb-server | stopped | stopped |inactive, dead|inactive,dead |inactive,dead | systemctl start ovs-vswitchd* | started | started |inactive, dead|active,running|active,running| systemctl start ovsdb-server* | not started | started |inactive, dead|inactive, dead|active,running| * These commands where executed when no ovs related processes where running. All other commands where executed when OVS was successfully running. Signed-off-by: Eelco Chaudron <echaudro@redhat.com> Acked-by: Markos Chandras <mchandras@suse.de> Acked-by: Aaron Conole <aconole@redhat.com> Acked-by: Flavio Leitner <fbl@sysclose.org> Signed-off-by: Russell Bryant <russell@ovn.org>
* rhel: Add hostname as dependencyJakub Libosvar2017-02-232-2/+2
| | | | | | | | ovs-ctl script uses hostname. This patch adds dependency for rhel systems. Signed-off-by: Jakub Libosvar <libosvar@redhat.com> Signed-off-by: Russell Bryant <russell@ovn.org>