[ovs-discuss] OVS 2.5.1.1 on PPCLE Arch

Jeremey Wise jwise at arrow.com
Sat Aug 25 12:16:02 UTC 2018


I don't think the architecture is core to the issue..  but I googled  around for quite some time on how to get OVS to install on RHEL.

Seems it is not native to the distro....  And a lot of the forums and entries about installations are older versions where the instructions have changed a lot.

The main website does not note the process that I could find... so I found and laid out the below set of steps

##########

RHEL Install Open vSwitch


# https://www.openvswitch.org/download/

# http://supercomputing.caltech.edu/blog/index.php/2016/05/03/open-vswitch-installation-on-centos-7-2/

[root at l90061 ~]# yum -y install make gcc openssl-devel autoconf automake rpm-build redhat-rpm-config python-devel openssl-devel kernel-devel kernel-debug-devel libtool wget

[root at l90061 ~]# mkdir -p ~/rpmbuild/SOURCES

[root at l90061 ~]# wget http://openvswitch.org/releases/openvswitch-2.5.1.tar.gz

[root at l90061 ~]# cp openvswitch-2.5.1.tar.gz ~/rpmbuild/SOURCES/

[root at l90061 ~]# tar xfz openvswitch-2.5.1.tar.gz

[root at l90061 ~]# sed 's/openvswitch-kmod, //g' openvswitch-2.5.1/rhel/openvswitch.spec > openvswitch-2.5.1/rhel/openvswitch_no_kmod.spec

[root at l90061 ~]# rpmbuild -bb --nocheck ~/openvswitch-2.5.1/rhel/openvswitch_no_kmod.spec

[root at l90061 ~]# ls -l ~/rpmbuild/RPMS/ppc64le/

total 11328

-rw-r--r--. 1 root root 2229132 Aug 24 23:30 openvswitch-2.5.1-1.ppc64le.rpm

-rw-r--r--. 1 root root 9367320 Aug 24 23:31 openvswitch-debuginfo-2.5.1-1.ppc64le.rpm

[root at l90061 ~]# yum localinstall ~/rpmbuild/RPMS/ppc64le/openvswitch-

openvswitch-2.5.1-1.ppc64le.rpm            openvswitch-debuginfo-2.5.1-1.ppc64le.rpm

[root at l90061 ~]# yum localinstall ~/rpmbuild/RPMS/ppc64le/openvswitch-2.5.1-1.ppc64le.rpm

Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager

Examining /root/rpmbuild/RPMS/ppc64le/openvswitch-2.5.1-1.ppc64le.rpm: openvswitch-2.5.1-1.ppc64le

Marking /root/rpmbuild/RPMS/ppc64le/openvswitch-2.5.1-1.ppc64le.rpm to be installed

Resolving Dependencies

--> Running transaction check

---> Package openvswitch.ppc64le 0:2.5.1-1 will be installed

--> Finished Dependency Resolution



Dependencies Resolved



================================================================================================================================================================================================================

Package                                         Arch                                        Version                                     Repository                                                        Size

================================================================================================================================================================================================================

Installing:

openvswitch                                     ppc64le                                     2.5.1-1                                     /openvswitch-2.5.1-1.ppc64le                                      10 M



Transaction Summary

================================================================================================================================================================================================================

Install  1 Package



Total size: 10 M

Installed size: 10 M

Is this ok [y/d/N]: y

Downloading packages:

Running transaction check

Running transaction test

Transaction test succeeded

Running transaction

  Installing : openvswitch-2.5.1-1.ppc64le                                                                                                                                                                  1/1

  Verifying  : openvswitch-2.5.1-1.ppc64le                                                                                                                                                                  1/1



Installed:

  openvswitch.ppc64le 0:2.5.1-1



Complete!

[root at l90061 ~]# systemctl start openvswitch.service

[root at l90061 ~]# systemctl enable openvswitch.service

openvswitch.service is not a native service, redirecting to /sbin/chkconfig.

Executing /sbin/chkconfig openvswitch on

[root at l90061 ~]# reboot

[root at l82471 ~]# ovs-vsctl -V

ovs-vsctl (Open vSwitch) 2.9.2

DB Schema 7.15.1

[root at l90061 ~]# ovs-vsctl add-br ovsbr0

ovs-vsctl: unix:/usr/local/var/run/openvswitch/db.sock: database connection failed (No such file or directory)

[root at l90061 ~]#

[root at l90061 /]# find . -name db.sock

./run/openvswitch/db.sock

[root at l90061 openvswitch]# ls -alh /run/openvswitch

total 128K

drwxr-xr-x.  2 root root  140 Aug 24 23:41 .

drwxr-xr-x. 44 root root 1.4K Aug 25 06:42 ..

srwxr-x---.  1 root root    0 Aug 24 23:41 db.sock

srwxr-x---.  1 root root    0 Aug 24 23:41 ovsdb-server.3732.ctl

-rw-r--r--.  1 root root    5 Aug 24 23:41 ovsdb-server.pid

srwxr-x---.  1 root root    0 Aug 24 23:41 ovs-vswitchd.3906.ctl

-rw-r--r--.  1 root root    5 Aug 24 23:41 ovs-vswitchd.pid

[root at l90061 openvswitch]# date

Sat Aug 25 07:50:07 EDT 2018






I also tried to translate to newer version of OVS but it also has issues with process
[root at l90061 ~]# ls
anaconda-ks.cfg  Documents  ibm-power-repo-latest.noarch.rpm  openvswitch-2.5.1         openvswitch-2.9.2         Pictures  rpmbuild   Videos
Desktop          Downloads  Music                             openvswitch-2.5.1.tar.gz  openvswitch-2.9.2.tar.gz  Public    Templates
[root at l90061 ~]# cp openvswitch-2.9.2.tar.gz ~/rpmbuild/SOURCES/
[root at l90061 ~]# tar xfz openvswitch-2.9.2.tar.gz
[root at l90061 ~]# sed 's/openvswitch-kmod, //g' openvswitch-2.9.2/rhel/openvswitch.spec > openvswitch-2.9.2/rhel/openvswitch_no_kmod.spec
[root at l90061 ~]# ls  ~/openvswitch-2.9.2/rhel/openvswitch
ls: cannot access /root/openvswitch-2.9.2/rhel/openvswitch: No such file or directory
[root at l90061 ~]# cat ~/openvswitch-2.9.2/rhel/README.RHEL.rst
<snip... ya.. readme of use.. not installation>

Please report problems to bugs at openvswitch.org.
[root at l90061 ~]# ls  ~/openvswitch-2.9.2/rhel/
openvswitch-dkms.spec            openvswitch-fedora.spec          openvswitch-kmod-fedora.spec     openvswitch-kmod.files           openvswitch-kmod-rhel6.spec.in   openvswitch.spec.in
openvswitch-dkms.spec.in         openvswitch-fedora.spec.in       openvswitch-kmod-fedora.spec.in  openvswitch-kmod-rhel6.spec      openvswitch.spec
#### I guess I just select Fedora as nothing is of value in readme for RHEL and no "rhel7"...
[root at l90061 ~]# rpmbuild -bb --nocheck ~/openvswitch-2.9.2/rhel/openvswitch-kmod-fedora.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.IQaKBD
+ umask 022
+ cd /root/rpmbuild/BUILD
+ cd /root/rpmbuild/BUILD
+ rm -rf openvswitch-2.9.2
+ /usr/bin/gzip -dc /root/rpmbuild/SOURCES/openvswitch-2.9.2.tar.gz
+ /usr/bin/tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd openvswitch-2.9.2
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.QtL70t
+ umask 022
+ cd /root/rpmbuild/BUILD
+ cd openvswitch-2.9.2
+ CFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mcpu=power8 -mtune=power8'
+ export CFLAGS
+ CXXFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mcpu=power8 -mtune=power8'
+ export CXXFLAGS
+ FFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mcpu=power8 -mtune=power8 -I/usr/lib64/gfortran/modules'
+ export FFLAGS
+ FCFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mcpu=power8 -mtune=power8 -I/usr/lib64/gfortran/modules'
+ export FCFLAGS
+ LDFLAGS='-Wl,-z,relro '
+ export LDFLAGS
+ '[' 1 == 1 ']'
+ '[' ppc64le == ppc64le ']'
+ /usr/lib/rpm/redhat/libtool-handle-ppc64le.sh
++ find . -name config.guess -o -name config.sub
+ for i in '$(find . -name config.guess -o -name config.sub)'
++ basename ./build-aux/config.guess
+ '[' -f /usr/lib/rpm/redhat/config.guess ']'
+ /usr/bin/rm -f ./build-aux/config.guess
++ basename ./build-aux/config.guess
+ /usr/bin/cp -fv /usr/lib/rpm/redhat/config.guess ./build-aux/config.guess
'/usr/lib/rpm/redhat/config.guess' -> './build-aux/config.guess'
+ for i in '$(find . -name config.guess -o -name config.sub)'
++ basename ./build-aux/config.sub
+ '[' -f /usr/lib/rpm/redhat/config.sub ']'
+ /usr/bin/rm -f ./build-aux/config.sub
++ basename ./build-aux/config.sub
+ /usr/bin/cp -fv /usr/lib/rpm/redhat/config.sub ./build-aux/config.sub
'/usr/lib/rpm/redhat/config.sub' -> './build-aux/config.sub'
+ ./configure --build=powerpc64le-redhat-linux-gnu --host=powerpc64le-redhat-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-linux=/lib/modules/3.1.5-1.fc16.x86_64/build --enable-ssl
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking how to create a pax tar archive... gnutar
checking for style of include used by make... GNU
checking for powerpc64le-redhat-linux-gnu-gcc... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... none
checking for gcc option to accept ISO C99... -std=gnu99
checking for powerpc64le-redhat-linux-gnu-g++... no
checking for powerpc64le-redhat-linux-gnu-c++... no
checking for powerpc64le-redhat-linux-gnu-gpp... no
checking for powerpc64le-redhat-linux-gnu-aCC... no
checking for powerpc64le-redhat-linux-gnu-CC... no
checking for powerpc64le-redhat-linux-gnu-cxx... no
checking for powerpc64le-redhat-linux-gnu-cc++... no
checking for powerpc64le-redhat-linux-gnu-cl.exe... no
checking for powerpc64le-redhat-linux-gnu-FCC... no
checking for powerpc64le-redhat-linux-gnu-KCC... no
checking for powerpc64le-redhat-linux-gnu-RCC... no
checking for powerpc64le-redhat-linux-gnu-xlC_r... no
checking for powerpc64le-redhat-linux-gnu-xlC... no
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... none
checking how to run the C preprocessor... gcc -std=gnu99 -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for fgrep... /usr/bin/grep -F
checking for egrep... /usr/bin/grep -E
checking for powerpc64le-redhat-linux-gnu-pkg-config... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether byte ordering is bigendian... no
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking build system type... powerpc64le-redhat-linux-gnu
checking host system type... powerpc64le-redhat-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for ld used by gcc -std=gnu99... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert powerpc64le-redhat-linux-gnu file names to powerpc64le-redhat-linux-gnu format... func_convert_file_noop
checking how to convert powerpc64le-redhat-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for powerpc64le-redhat-linux-gnu-objdump... no
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for powerpc64le-redhat-linux-gnu-dlltool... no
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for powerpc64le-redhat-linux-gnu-ar... no
checking for ar... ar
checking for archiver @FILE support... @
checking for powerpc64le-redhat-linux-gnu-strip... no
checking for strip... strip
checking for powerpc64le-redhat-linux-gnu-ranlib... no
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc -std=gnu99 object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for powerpc64le-redhat-linux-gnu-mt... no
checking for mt... no
checking if : is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc -std=gnu99 supports -fno-rtti -fno-exceptions... no
checking for gcc -std=gnu99 option to produce PIC... -fPIC -DPIC
checking if gcc -std=gnu99 PIC flag -fPIC -DPIC works... yes
checking if gcc -std=gnu99 static flag -static works... no
checking if gcc -std=gnu99 supports -c -o file.o... yes
checking if gcc -std=gnu99 supports -c -o file.o... (cached) yes
checking whether the gcc -std=gnu99 linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for library containing pow... -lm
checking for library containing clock_gettime... none required
checking for library containing timer_create... -lrt
checking for library containing pthread_create... -lpthread
checking whether strerror_r is declared... yes
checking for strerror_r... yes
checking whether strerror_r returns char *... yes
checking vmware.h usability... no
checking vmware.h presence... no
checking for vmware.h... no
checking for MSVC x64 compiler... no
checking windows.h usability... no
checking windows.h presence... no
checking for windows.h... no
checking for linux/netlink.h... yes
checking for pkg-config... /usr/bin/pkg-config
checking whether compiling and linking against OpenSSL works... yes
checking for capng_clear in -lcap-ng... no
configure: WARNING: cannot find libcap-ng.
--user option will not be supported on Linux.
(you may use --disable-libcapng to suppress this warning).
checking for Python 2.x for x >= 7... /usr/bin/python
checking whether /usr/bin/python has six library... yes
checking for Python 3.x for x >= 4... no
checking for flake8... no
checking for sphinx... no
checking for dot... no
checking net/if_packet.h usability... yes
checking net/if_packet.h presence... yes
checking for net/if_packet.h... yes
checking net/if_dl.h usability... no
checking net/if_dl.h presence... no
checking for net/if_dl.h... no
checking whether strtok_r macro segfaults on some inputs... no
checking whether sys_siglist is declared... yes
checking for struct stat.st_mtim.tv_nsec... yes
checking for struct stat.st_mtimensec... no
checking for struct ifreq.ifr_flagshigh... no
checking for struct mmsghdr.msg_len... yes
checking for struct sockaddr_in6.sin6_scope_id... yes
checking for mlockall... yes
checking for strnlen... yes
checking for getloadavg... yes
checking for statvfs... yes
checking for getmntent_r... yes
checking for sendmmsg... yes
checking for clock_gettime... yes
checking mntent.h usability... yes
checking mntent.h presence... yes
checking for mntent.h... yes
checking sys/statvfs.h usability... yes
checking sys/statvfs.h presence... yes
checking for sys/statvfs.h... yes
checking linux/types.h usability... yes
checking linux/types.h presence... yes
checking for linux/types.h... yes
checking linux/if_ether.h usability... yes
checking linux/if_ether.h presence... yes
checking for linux/if_ether.h... yes
checking stdatomic.h usability... no
checking stdatomic.h presence... no
checking for stdatomic.h... no
checking for net/if_mib.h... no
checking for library containing backtrace... none required
checking linux/perf_event.h usability... yes
checking linux/perf_event.h presence... yes
checking for linux/perf_event.h... yes
checking valgrind/valgrind.h usability... no
checking valgrind/valgrind.h presence... no
checking for valgrind/valgrind.h... no
checking for connect in -lsocket... no
checking for library containing gethostbyname... none required
checking XenServer release... none
checking for groff... yes
checking whether gcc -std=gnu99 has <threads.h> that supports thread_local... no
checking whether gcc -std=gnu99 supports __thread... yes
checking for library containing __atomic_load_8... -latomic
checking whether gcc -std=gnu99 supports GCC 4.0+ atomic built-ins... yes
checking value of __atomic_always_lock_free(1)... 1
checking value of __atomic_always_lock_free(2)... 1
checking value of __atomic_always_lock_free(4)... 1
checking value of __atomic_always_lock_free(8)... 1
checking for library containing aio_write... none required
checking for pthread_set_name_np... no
checking for pthread_setname_np() variant... glibc
checking whether __linux__ is defined... true
checking linker output version information... libX-2.9.so.0.0.2)
checking whether g++ supports C++11 features by default... no
checking whether g++ supports C++11 features with -std=gnu++11... yes
checking for working posix_memalign... yes
checking whether the preprocessor supports include_next... yes
checking whether system header files limit the line length... no
checking for stdio.h... yes
checking for string.h... (cached) yes
checking whether gcc -std=gnu99 accepts -Werror... yes
checking whether gcc -std=gnu99 accepts -Wall... yes
checking whether gcc -std=gnu99 accepts -Wextra... yes
checking whether gcc -std=gnu99 accepts -Wno-sign-compare... yes
checking whether gcc -std=gnu99 accepts -Wpointer-arith... yes
checking whether gcc -std=gnu99 accepts -Wformat -Wformat-security... yes
checking whether gcc -std=gnu99 accepts -Wswitch-enum... yes
checking whether gcc -std=gnu99 accepts -Wunused-parameter... yes
checking whether gcc -std=gnu99 accepts -Wbad-function-cast... yes
checking whether gcc -std=gnu99 accepts -Wcast-align... yes
checking whether gcc -std=gnu99 accepts -Wstrict-prototypes... yes
checking whether gcc -std=gnu99 accepts -Wold-style-definition... yes
checking whether gcc -std=gnu99 accepts -Wmissing-prototypes... yes
checking whether gcc -std=gnu99 accepts -Wmissing-field-initializers... yes
checking whether gcc -std=gnu99 accepts -Wthread-safety... no
checking whether gcc -std=gnu99 accepts -fno-strict-aliasing... yes
checking whether gcc -std=gnu99 accepts -Wswitch-bool... no
checking whether gcc -std=gnu99 accepts -Wlogical-not-parentheses... no
checking whether gcc -std=gnu99 accepts -Wsizeof-array-argument... no
checking whether gcc -std=gnu99 accepts -Wbool-compare... no
checking whether gcc -std=gnu99 accepts -Wshift-negative-value... no
checking whether gcc -std=gnu99 accepts -Wduplicated-cond... no
checking whether gcc -std=gnu99 accepts -Qunused-arguments... no
checking whether gcc -std=gnu99 accepts -Wno-unused... yes
checking whether gcc -std=gnu99 accepts -Wno-unused-parameter... yes
checking target hint for cgcc... other
checking for Linux build directory... no
configure: error: source dir /lib/modules/3.1.5-1.fc16.x86_64/build doesn't exist
error: Bad exit status from /var/tmp/rpm-tmp.QtL70t (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.QtL70t (%build)
[root at l90061 ~]#




###########
As you can see it fails.. my guess is a conf file is pointing to the incorrect path for the 'run' file locations.

Any help on

  1.  Am I doing this correctly for RHEL / Centos
  2.  Is their a fix for the above
  3.  Is their a subscription channel I can add to RHEL that has this built as an RPM


Thanks,

penguinpages

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-discuss/attachments/20180825/94a9a3fb/attachment-0001.html>


More information about the discuss mailing list