Skip to content

Commit

Permalink
Add debug steps
Browse files Browse the repository at this point in the history
Signed-off-by: Rakshitha Kamath <[email protected]>
  • Loading branch information
rakshithakamath94 committed Aug 7, 2023
1 parent 1cff6f8 commit c134a67
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 11 deletions.
9 changes: 6 additions & 3 deletions build_scripts/build-fsal/build-fsal_cephfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@ set -e
GIT_REPO="https://${GERRIT_HOST}/${GERRIT_PROJECT}"

# enable the Storage SIG Gluster and Ceph repositories
yum -y install centos-release-ceph
dnf -y install centos-release-ceph
#sleep 30000
#dnf install -y centos-release-nfs-ganesha-30 centos-release-ceph-octopus

BUILDREQUIRES="git bison cmake dbus-devel flex gcc-c++ krb5-devel libacl-devel libblkid-devel libcap-devel redhat-rpm-config rpm-build xfsprogs-devel"

BUILDREQUIRES_EXTRA="libnsl2-devel libnfsidmap-devel libwbclient-devel libcephfs-devel userspace-rcu-devel"
#BUILDREQUIRES_EXTRA="libnsl2-devel libnfsidmap-devel libwbclient-devel libcephfs-devel userspace-rcu-devel"
BUILDREQUIRES_EXTRA="libnsl2-devel libnfsidmap-devel libwbclient-devel userspace-rcu-devel"

# basic packages to install
case "${CENTOS_VERSION}" in
Expand All @@ -24,7 +27,7 @@ case "${CENTOS_VERSION}" in
;;
8s)
yum install -y ${BUILDREQUIRES}
yum install --enablerepo=powertools -y ${BUILDREQUIRES_EXTRA}
yum install --enablerepo=powertools -y ${BUILDREQUIRES_EXTRA} libcephfs-devel
;;
9s)
yum install -y ${BUILDREQUIRES}
Expand Down
4 changes: 3 additions & 1 deletion build_scripts/code-compilation/client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ yum -y install nfs-utils git gcc time centos-release-gluster centos-release-ceph
# flag for commands which should run only once
once=0

for ver in 3 4.0 4.1
#NFS-Ganesha is crashing when installing 4.0, so taking it out to see if 4.1 works

for ver in 3 4.1
do
echo "--------------------------------------------------"
echo "Running test on Mount Version $ver"
Expand Down
11 changes: 6 additions & 5 deletions build_scripts/common/basic-gluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ set -e
set -x

# enable repositories
yum -y install centos-release-gluster yum-utils centos-release-ceph
yum -y install centos-release-gluster yum-utils centos-release-ceph

# make sure rpcbind is running
yum -y install rpcbind
Expand Down Expand Up @@ -68,19 +68,20 @@ else
GIT_REPO=$(basename "${GERRIT_PROJECT}")
GIT_URL="https://${GERRIT_HOST}/${GERRIT_PROJECT}"

BASE_PACKAGES="git bison flex cmake gcc-c++ libacl-devel krb5-devel dbus-devel rpm-build redhat-rpm-config"
BASE_PACKAGES="git bison flex cmake gcc-c++ libacl-devel krb5-devel dbus-devel rpm-build redhat-rpm-config gdb"
BUILDREQUIRES_EXTRA="libnsl2-devel libnfsidmap-devel libwbclient-devel libcephfs-devel userspace-rcu-devel"
if [ "${CENTOS_VERSION}" = "7" ]; then
yum -y install libgfapi-devel
yum -y install ${BASE_PACKAGES} libnfsidmap-devel libwbclient-devel libcap-devel libblkid-devel userspace-rcu-devel userspace-rcu python2-devel
elif [ "${CENTOS_VERSION}" = "8s" ]; then
yum install -y ${BASE_PACKAGES} libacl-devel libblkid-devel libcap-devel redhat-rpm-config rpm-build libgfapi-devel xfsprogs-devel
yum install --enablerepo=powertools -y ${BUILDREQUIRES_EXTRA}
yum -y install selinux-policy-devel sqlite samba-winbind
yum -y install selinux-policy-devel sqlite samba-winbind
elif [ "${CENTOS_VERSION}" = "9s" ]; then
yum install -y ${BASE_PACKAGES} libacl-devel libblkid-devel libcap-devel redhat-rpm-config rpm-build libgfapi-devel xfsprogs-devel
sleep 3000
yum install --enablerepo=crb -y ${BUILDREQUIRES_EXTRA}
yum -y install selinux-policy-devel sqlite
yum -y install selinux-policy-devel sqlite samba-winbind
fi

git init "${GIT_REPO}"
Expand All @@ -103,7 +104,7 @@ else
mkdir build
pushd build

cmake -DCMAKE_BUILD_TYPE=Maintainer -DUSE_FSAL_GLUSTER=ON ../src
cmake -DCMAKE_BUILD_TYPE=Maintainer -DUSE_FSAL_GLUSTER=ON -DUSE_DBUS=ON -D_MSPAC_SUPPORT=OFF ../src
make dist
rpmbuild -ta --define "_srcrpmdir $PWD" --define "_rpmdir $PWD" *.tar.gz
rpm_arch=$(rpm -E '%{_arch}')
Expand Down
8 changes: 6 additions & 2 deletions build_scripts/common/basic-server-client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ function server_run()
scp ${SSH_OPTIONS} ${2} root@${1}:./$(basename ${2})

ssh -t ${SSH_OPTIONS} root@${1} "GERRIT_HOST='${GERRIT_HOST}' GERRIT_PROJECT='${GERRIT_PROJECT}' GERRIT_REFSPEC='${GERRIT_REFSPEC}' CENTOS_VERSION='${CENTOS_VERSION}' CENTOS_ARCH='${CENTOS_ARCH}' ${VOLUME_TYPE}_VOLUME='${EXPORT}' YUM_REPO='${YUM_REPO}' ${INCLUDE_TEMPLATE_URL} ${INCLUDE_ACL_PARAM} bash ./$(basename ${2})"
RETURN_CODE=$?
#RETURN_CODE=$?

return $RETURN_CODE
#return $RETURN_CODE
}

function client_run()
Expand Down Expand Up @@ -52,11 +52,15 @@ elif [ "${SERVER_TEST_SCRIPT}" ] && [ "${CLIENT_TEST_SCRIPT}" ]; then
CLIENT_IP=$(cat $WORKSPACE/hosts | sed -n '2p')
server_run ${SERVER_IP} ${SERVER_TEST_SCRIPT}
SERVER_SCRIPT_RESULT=$?
echo "SERVER_SCRIPT_RESULT = $SERVER_SCRIPT_RESULT"
if [ "${SERVER_SCRIPT_RESULT}" == "0" ]; then
echo "Server script success!"
client_run ${CLIENT_IP} ${CLIENT_TEST_SCRIPT} ${SERVER_IP}
FINAL_RESULT=$?
else
scp root@${SERVER_IP}:/root/rpmbuild/BUILD/nfs-ganesha-5.4/CMakeFiles/CMakeOutput.log $WORKSPACE
scp root@${SERVER_IP}:/root/rpmbuild/BUILD/nfs-ganesha-5.4/CMakeFiles/CMakeError.log $WORKSPACE
ls -ltr $WORKSPACE
FINAL_RESULT=${SERVER_SCRIPT_RESULT}
fi
fi
Expand Down
1 change: 1 addition & 0 deletions jobs/code_compilation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@
- cleanup-ws

publishers:
- archive_artifacts
- post_build_task_return-node
10 changes: 10 additions & 0 deletions jobs/macros.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,3 +152,13 @@
operator: OR
script:
!include-raw: ../build_scripts/common/return-node.sh

- publisher:
name: archive_artifacts
publishers:
- archive:
artifacts: '*.log'
allow-empty: true
only-if-success: false
fingerprint: true
excludes: path

0 comments on commit c134a67

Please sign in to comment.