Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues encountered using Cloudbench with ubuntu ppc64el #61

Closed
cpschult opened this issue Jan 22, 2015 · 1 comment
Closed

Issues encountered using Cloudbench with ubuntu ppc64el #61

cpschult opened this issue Jan 22, 2015 · 1 comment

Comments

@cpschult
Copy link
Contributor

Below are listed the changes I made to get cloudbench/cbtool to install/run correctly with ubuntu 14.10 on ppc64el.

I'm using an IBM JVM with cassandra 2.1.2.
I was installing cassandra_ycsb and the null workload.
$ ./install --role workload --wks nullworkload,cassandra_ycsb
#1

The command to change options UseDNS and GSSAPIAuthentication should be prefixed with 'sudo'.

Error text from install:

(52) Checking "sshd" version by executing the command "sudo cat /etc/ssh/sshd_config | grep -v ^# | grep UseDNS | grep no"...
RESULT:  NOT OK.
ACTION:  Please install/configure "sshd" by issuing the following command: "sed -i 's/.*UseDNS.*/UseDNS no/g' /etc/ssh/sshd_config; sed -i 's/.*GSSAPIAuthentication.*/GSSAPIAuthentication no/g' /etc/ssh/sshd_config;"

(52) Installing "sshd" by executing the command "sed -i 's/.*UseDNS.*/UseDNS no/g' /etc/ssh/sshd_config; sed -i 's/.*GSSAPIAuthentication.*/GSSAPIAuthentication no/g' /etc/ssh/sshd_config;"...
RESULT: NOT OK. There was an error while installing "sshd".: Error while executing the command line "sed -i 's/.*UseDNS.*/UseDNS no/g' /etc/ssh/sshd_config; sed -i 's/.*GSSAPIAuthentication.*/GSSAPIAuthentication no/g' /etc/ssh/sshd_config;" (returncode = 12990) :sed: couldn't open temporary file /etc/ssh/sedTyg5Ug: Permission denied
sed: couldn't open temporary file /etc/ssh/sedSIE0Pg: Permission denied

#2

The default ubuntu sshd_config does not contain options 'UseDNS' or 'GSSAPIAuthentication'. The cloudbench installer fails the sshd dependency from PUBLIC_dependencies. I'm not sure the best approach to fix this problem. Perhaps check if the option is present ('grep -c ^UseDNS /etc/ssh/sshd_config') and append to the end of the file if not.
#3

Comment out 'chef-client-order' from PUBLIC_dependencies.txt because chef client is not available for linux ppc64el.
#4

The softlayer vpn is only available as an amd64 package. I've commented softlayer-vpn-order from IBM_dependencies.txt as I don't need it. Also, should the VPN client be required on the 'workload' system? Shouldn't that only be required on the CB orchestrator system? ( Since the workload already resides on the private network? Anyway, not an issue if the host is x86_64. )
#5

ubuntu initially failed to install the 'repo' requirement.

(1) Installing "repo" by executing the command "sudo mv -f /tmp/*.list /etc/apt/sources.list.d/; sudo apt-get update; touch /tmp/repoupdated; source /home/cbuser/cloudbench/scripts//common/cb_bootstrap.sh; service_stop_disable iptables; service_stop_disable ipfw;"...
RESULT: NOT OK. There was an error while installing "repo".: Error while executing the command line "sudo mv -f /tmp/*.list /etc/apt/sources.list.d/; sudo apt-get update; touch /tmp/repoupdated; source /home/cbuser/cloudbench/scripts//common/cb_bootstrap.sh; service_stop_disable iptables; service_stop_disable ipfw;" (returncode = 3904) :mv: cannot stat ‘/tmp/*.list’: No such file or directory
/bin/sh: 1: source: not found
/bin/sh: 1: service_stop_disable: not found
/bin/sh: 1: service_stop_disable: not found

Reading python documentation suggests /bin/sh is the default executable unless another is specified. Apparently /bin/sh on ubuntu (ie. /bin/dash) doesn't provide support for sourcing files. ( http://stackoverflow.com/questions/13702425/source-command-not-found-in-sh-shell )

I was able to specify "/bin/bash" on Popen. (https://docs.python.org/2/library/subprocess.html)
With this change in place the repo requirement is completed without issue.

$ diff -C 3 lib/remote/process_management.py.orig lib/remote/process_management.py
*** lib/remote/process_management.py.orig       2014-12-01 11:47:47.930023003 -0600
--- lib/remote/process_management.py    2014-12-01 11:45:41.654023009 -0600
***************
*** 115,121 ****
          if str(really_execute).lower() == "true" :
              _msg = "running os command: " + _cmd
              cbdebug(_msg);
!             _proc_h = Popen(_cmd, shell=True, stdout=PIPE, stderr=PIPE)

              if _proc_h.pid :
                  if not cmdline.count("--debug_host=localhost") :
--- 115,121 ----
          if str(really_execute).lower() == "true" :
              _msg = "running os command: " + _cmd
              cbdebug(_msg);
!             _proc_h = Popen(_cmd, executable="/bin/bash", shell=True, stdout=PIPE, stderr=PIPE)

              if _proc_h.pid :
                  if not cmdline.count("--debug_host=localhost") :

#6

-- I downloaded a cassandra 2.1.2 package from http://debian.datastax.com/community/pool/ and http://www.apache.org/dist/cassandra/debian/pool/main/c/cassandra/. Both of these packages put cassandra configuration files in /etc/cassandra/ instead of /etc/cassandra/conf. This may be a 'feature' of the debian packages.

I hardcoded my copy of cbtool to use this path for cassandra configuration files. It should be possible to perform this test automatically (perhaps in cb_ycsb_common.sh? ) though perhaps it would be better as a configuration parameter? I think this configuration path is unique for ubuntu systems.

Set the configuration path in cb_ycsb_common.sh

diff --git a/scripts/cassandra_ycsb/cb_ycsb_common.sh b/scripts/cassandra_ycsb/cb_ycsb_common.sh
index 00db685..084d836 100755
--- a/scripts/cassandra_ycsb/cb_ycsb_common.sh
+++ b/scripts/cassandra_ycsb/cb_ycsb_common.sh
@@ -54,6 +54,7 @@ BACKEND_TYPE=$(get_my_ai_attribute type | sed 's/_ycsb//g')

 if [[ $BACKEND_TYPE == "cassandra" ]]
 then
+    export CASSANDRA_CONFIG_DIR=/etc/cassandra/
     CASSANDRA_DATA_DIR=$(get_my_ai_attribute_with_default cassandra_data_dir /dbstore)
     eval CASSANDRA_DATA_DIR=${CASSANDRA_DATA_DIR}

Changes were made each location where cassandra.yaml is referenced in the following files:
scripts/cassandra_ycsb/cb_modify_node.sh
scripts/cassandra_ycsb/cb_restart_node.sh
scripts/cassandra_ycsb/cb_restart_seed.sh

@maugustosilva
Copy link
Collaborator

I believe that all the issues described here were fixed in commit b64864f. If not, please feel free to re-open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants