summaryrefslogtreecommitdiffstats
path: root/src/vlib/unix
AgeCommit message (Expand)AuthorFilesLines
2018-02-06vlib: epoll on worker threadsDamjan Marion2-34/+152
2018-01-30VPP-899: Run VPP under SELinuxBilly McFall1-4/+20
2017-12-10VPP-1077 Add meaningful error info, when executing command with enable/disabl...Swarup Nayak1-7/+19
2017-12-06fix bug in pagerNeale Ranns1-2/+3
2017-11-29Configure vat-plugin-path and vat-plugin-name-filterDave Barach2-1/+24
2017-11-18Call a plugin init function by nameDave Barach1-0/+26
2017-11-13Instead of a min term size, use a default (VPP-1061)Chris Luke1-16/+21
2017-10-20Thread_index for thread0 in vlib_global_main not initialisedKeith Burns (alagalah)1-0/+1
2017-10-14VPP-1029: Don't call clib_longjmp(...) directly from the SIGTERM handlerDave Barach1-4/+3
2017-10-03Repair vlib API socket serverDave Barach2-2/+2
2017-09-22Fix vpp "unix interactive" when running under emacs + gdbDave Barach1-3/+8
2017-09-21vppctl,cli: Improve non-interactive vppctl (VPP-944)Chris Luke1-51/+308
2017-09-20CLI: fix segfault when browsing an empty historyYoann Desmouceaux1-3/+1
2017-09-18Fixes for issues Coverity has reported (VPP-972)Chris Luke1-0/+30
2017-09-14clib_socket: add sendmsg / recvmsg with ancillary data supportDamjan Marion1-2/+2
2017-09-09move unix_file_* code to vppinfraDamjan Marion6-154/+92
2017-09-08vlib: move linux-specific code to vlib/linuxDamjan Marion3-675/+0
2017-09-08Fixes for issues reported by Coverity (VPP-972)Chris Luke1-4/+4
2017-09-07vlib physmem reworkDamjan Marion4-385/+389
2017-09-05Add pidfile cmdline optionPierre Pfister3-9/+98
2017-08-31Set runtime_path properly when running non-rootDamjan Marion1-2/+11
2017-08-24Make VPP runtime directory configurableDamjan Marion4-20/+63
2017-07-27Thread safe internal buffer managerDamjan Marion1-1/+2
2017-07-10vlib: store buffer memory information in the buffer_mainDamjan Marion1-9/+0
2017-07-06unix: mkdir VPP_RUN_DIR before opening a socket in itChris Luke3-0/+30
2017-06-28switch vlib process model to tw_timer_template timer implDave Barach1-36/+25
2017-06-21Add option to create clib_socket with group write permissionsDamjan Marion1-1/+4
2017-06-21Add knob to specify effective group id (gid) for VPP processDamjan Marion1-0/+7
2017-06-06vlib: add screen-256color CLI terminal typeDamjan Marion1-0/+1
2017-06-05vlib: add unix_file_del_by_index functionDamjan Marion1-0/+8
2017-05-23Add TAB-based auto-completion to the CLIYoann Desmouceaux1-0/+153
2017-05-16VPP-845: add configurable elog post-mortem dumpDave Barach1-4/+4
2017-05-10completelly deprecate os_get_cpu_number, replace new occurencesDamjan Marion1-1/+1
2017-04-26Exit if plugin load attempt failDamjan Marion1-6/+2
2017-04-11Fix typo in minimal epoll polling timePierre Pfister1-1/+1
2017-04-06Use thread local storage for thread indexDamjan Marion3-28/+24
2017-03-22vlib: add description field in plugin registrationDamjan Marion2-5/+10
2017-03-06Add support for unix { coredump-size <size> }.Klement Sekera1-0/+22
2017-03-02Clean up binary api message handler registration issuesDave Barach1-7/+24
2017-02-26Load plugins in alphabetical orderDave Barach1-9/+55
2017-02-22VPP-635: CLI Memory leak with invalid parameterBilly McFall1-6/+16
2017-02-07VPP-630: Null pointer dereferences in vlib/unix/plugin.cOle Troan1-1/+1
2017-02-03Plugin infrastructure improvementsDamjan Marion3-60/+318
2017-01-23binary-api debug CLI works with pluginsDave Barach1-2/+7
2017-01-14vlib: add buffer and thread callbacksDamjan Marion1-7/+8
2017-01-07plugin: add API to get pointer to symbol in different pluginDamjan Marion2-7/+26
2017-01-03vlib: merge libvlib_unix.so into libvlib.soDamjan Marion1-1/+1
2016-12-28Reorganize source tree to use single autotools instanceDamjan Marion14-0/+6731
oGAYO2RmvRm0phll18OQVJV IpKk9kLKAKZ/R/K32hAsikBC8SVPQTPniyaifFWx81diblalff2hX4ipTf7Yx24I wMIMZuW7Im/R7QMef4+94G3Bad7p7JuE/qnAEHJ2OBnu+eYfxaK35XDsrq6XMazS NqHE7hOq3giVfgg+C12hCKMCgYEAtu9dbYcG5owbehxzfRI2/OCRsjz/t1bv1seM xVMND4XI6xb/apBWAZgZpIFrqrWoIBM3ptfsKipZe91ngBPUnL9s0Dolx452RVAj yctHB8uRxWYgqDkjsxtzXf1HnZBBkBS8CUzYj+hdfuddoeKLaY3invXLCiV+PpXS U4KAK9kCgYEAtSv0m5+Fg74BbAiFB6kCh11FYkW94YI6B/E2D/uVTD5dJhyEUFgZ cWsudXjMki8734WSpMBqBp/J8wG3C9ZS6IpQD+U7UXA+roB7Qr+j4TqtWfM+87Rh maOpG56uAyR0w5Z9BhwzA3VakibVk9KwDgZ29WtKFzuATLFnOtCS46E= -----END RSA PRIVATE KEY----- EOF chmod 600 ${VIRL_PKEY} # # Pick a random host from the array of VIRL servers, and attempt # to reach it and verify it's status. # # The server must be reachable, and have a "status" file with # the content "PRODUCTION", to be selected. # # If the server is not reachable, or does not have the correct # status, remove it from the array and start again. # # Abort if there are no more servers left in the array. # while [[ ! "$VIRL_SERVER" ]] do num_hosts=${#VIRL_SERVERS[@]} if [ $num_hosts == 0 ] then echo "No more VIRL candidate hosts available, failing." exit 127 fi element=$[ $RANDOM % $num_hosts ] virl_server_candidate=${VIRL_SERVERS[$element]} virl_server_status=$(ssh ${SSH_OPTIONS} ${VIRL_USERNAME}@${virl_server_candidate} cat $VIRL_SERVER_STATUS_FILE 2>&1) echo VIRL HOST $virl_server_candidate status is \"$virl_server_status\" if [ "$virl_server_status" == "$VIRL_SERVER_EXPECTED_STATUS" ] then # Candidate is in good status. Select this server. VIRL_SERVER="$virl_server_candidate" else # Candidate is in bad status. Remove from array. VIRL_SERVERS=("${VIRL_SERVERS[@]:0:$element}" "${VIRL_SERVERS[@]:$[$element+1]}") fi done SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # VPP, VPP plugin and Honeycomb packages should already be in working directory if [ "${OS}" == "centos7" ]; then VPP_PKGS=(*.rpm) else VPP_PKGS=(*.deb) fi echo ${VPP_PKGS[@]} VIRL_DIR_LOC="/tmp" VPP_PKGS_FULL=(${VPP_PKGS[@]}) # Prepend directory location at remote host to package file list for index in "${!VPP_PKGS_FULL[@]}"; do VPP_PKGS_FULL[${index}]=${VIRL_DIR_LOC}/${VPP_PKGS_FULL[${index}]} done echo "Updated file names: " ${VPP_PKGS_FULL[@]} cat ${VIRL_PKEY} # Copy the files to VIRL hosts DONE="" for index in "${!VIRL_SERVER[@]}"; do # Do not copy files in case they have already been copied to the VIRL host [[ "${DONE[@]}" =~ "${VIRL_SERVER[${index}]}" ]] && copy=0 || copy=1 if [ "${copy}" -eq "0" ]; then echo "files have already been copied to the VIRL host ${VIRL_SERVER[${index}]}" else if [ "${OS}" == "centos7" ]; then scp ${SSH_OPTIONS} *.rpm \ ${VIRL_USERNAME}@${VIRL_SERVER[${index}]}:${VIRL_DIR_LOC}/ else scp ${SSH_OPTIONS} *.deb \ ${VIRL_USERNAME}@${VIRL_SERVER[${index}]}:${VIRL_DIR_LOC}/ fi result=$? if [ "${result}" -ne "0" ]; then echo "Failed to copy files to VIRL host ${VIRL_SERVER[${index}]}" echo ${result} exit ${result} else echo "files successfully copied to the VIRL host ${VIRL_SERVER[${index}]}" fi DONE+=(${VIRL_SERVER[${index}]}) fi done # Start a simulation on VIRL server echo "Starting simulation on VIRL server" function stop_virl_simulation { ssh ${SSH_OPTIONS} ${VIRL_USERNAME}@${VIRL_SERVER}\ "stop-testcase ${VIRL_SID}" } VIRL_SID=$(ssh ${SSH_OPTIONS} \ ${VIRL_USERNAME}@${VIRL_SERVER} \ "start-testcase -c ${VIRL_TOPOLOGY} -r ${VIRL_RELEASE} ${VPP_PKGS_FULL[@]}") retval=$? if [ "${retval}" -ne "0" ]; then echo "VIRL simulation start failed" exit ${retval} fi if [[ ! "${VIRL_SID}" =~ session-[a-zA-Z0-9_]{6} ]]; then echo "No VIRL session ID reported." exit 127 fi # Upon script exit, cleanup the simulation execution trap stop_virl_simulation EXIT echo ${VIRL_SID} ssh_do ${VIRL_USERNAME}@${VIRL_SERVER} cat /scratch/${VIRL_SID}/topology.yaml # Download the topology file from virl session scp ${SSH_OPTIONS} \ ${VIRL_USERNAME}@${VIRL_SERVER}:/scratch/${VIRL_SID}/topology.yaml \ topologies/enabled/topology.yaml retval=$? if [ "${retval}" -ne "0" ]; then echo "Failed to copy topology file from VIRL simulation" exit ${retval} fi virtualenv --system-site-packages env . env/bin/activate echo pip install pip install -r ${SCRIPT_DIR}/requirements.txt pykwalify -s ${SCRIPT_DIR}/resources/topology_schemas/3_node_topology.sch.yaml \ -s ${SCRIPT_DIR}/resources/topology_schemas/topology.sch.yaml \ -d ${SCRIPT_DIR}/topologies/enabled/topology.yaml \ -vvv if [ "$?" -ne "0" ]; then echo "Topology schema validation failed." echo "However, the tests will start." fi PYTHONPATH=`pwd` pybot -L TRACE -W 136\ -v TOPOLOGY_PATH:${SCRIPT_DIR}/topologies/enabled/topology.yaml \ --suite "tests.honeycomb.func" \ --include HC_FUNC \ --noncritical EXPECTED_FAILING \ tests/ RETURN_STATUS=$? # Get Honeycomb log file from virl host scp ${SSH_OPTIONS} \ ${VIRL_USERNAME}@${VIRL_SERVER}:/scratch/${VIRL_SID}/honeycomb.log . || true # Archive JOB artifacts in jenkins for i in ${JOB_ARCHIVE_ARTIFACTS[@]}; do cp $( readlink -f ${i} | tr '\n' ' ' ) ${JOB_ARCHIVE_DIR}/ done # Archive JOB artifacts to logs.fd.io for i in ${LOG_ARCHIVE_ARTIFACTS[@]}; do cp $( readlink -f ${i} | tr '\n' ' ' ) ${LOG_ARCHIVE_DIR}/ done exit ${RETURN_STATUS}