You are viewing a plain text version of this content. The canonical link for it is here.
Posted to codereview@trafodion.apache.org by amandamoran <gi...@git.apache.org> on 2016/02/02 18:58:54 UTC
[GitHub] incubator-trafodion pull request: [[ TRAFODION 1800 ]] Changes for...
GitHub user amandamoran opened a pull request:
https://github.com/apache/incubator-trafodion/pull/302
[[ TRAFODION 1800 ]] Changes for Backup/Restore
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/amandamoran/incubator-trafodion installbugfixes
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-trafodion/pull/302.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #302
----
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-trafodion pull request: [[ TRAFODION 1800 ]] Changes for...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/incubator-trafodion/pull/302
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-trafodion pull request: [[ TRAFODION 1800 ]] Changes for...
Posted by arvind-narain <gi...@git.apache.org>.
Github user arvind-narain commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/302#discussion_r52345951
--- Diff: install/installer/traf_add_sudoAccess ---
@@ -42,4 +53,31 @@ if [[ $all_node_count -gt "1" ]]; then
else
sudo cp $TRAF_USR /etc/sudoers.d
fi
-
+
+}
+
+function copyFile {
+
+if [[ $all_node_count -gt "1" ]]; then
+ $TRAF_PDCP $BACKUP_USER $HOME
+ $TRAF_PDSH sudo cp $HOME/$BACKUP_USER /etc/sudoers.d/
+ $TRAF_PDSH sudo rm -f $HOME/$BACKUP_USER
+else
+ sudo cp $BACKUP_USER /etc/sudoers.d
+fi
+
+}
+
+
+#Main
+echo "***INFO: Creating $TRAF_USER sudo access file"
+echo
+
+if [[ "$ENABLE_HA" == "Y" ]]; then
--- End diff --
ENABLE_HA gets set to true or false - should this check be for "true" ?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-trafodion pull request: [[ TRAFODION 1800 ]] Changes for...
Posted by arvind-narain <gi...@git.apache.org>.
Github user arvind-narain commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/302#discussion_r52347768
--- Diff: install/installer/traf_config_check ---
@@ -487,6 +487,18 @@ if [[ "$SUSE_LINUX" != "true" ]]; then
fi
}
+function checkBackupUser {
+
+if [ -z $BACKUP_USER ]; then
+ echo "***ERROR: BACKUP_USER variable not set in config file."
+ echo "***WARNING: BACKUP_USER will be set to trafodion."
+ sudo chmod 777 $TRAF_CONFIG
+ sudo "export BACKUP_USER=\"trafodion\"" >> $TRAF_CONFIG
+ sudo chmod 777 $TRAF_CONFIG
+fi
--- End diff --
Should "source $TRAF_CONFIG" be done here after setting BACKUP_USER ?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-trafodion pull request: [[ TRAFODION 1800 ]] Changes for...
Posted by svarnau <gi...@git.apache.org>.
Github user svarnau commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/302#discussion_r52378054
--- Diff: install/installer/traf_cloudera_mods98 ---
@@ -158,6 +158,21 @@ if [ $? != 0 ]; then
fi
sudo su $HDFS_USER --command "$HADOOP_BIN_PATH/hadoop fs -chown -R $TRAF_USER:trafodion /lobs"
+
+#Create Backup directory
+sudo su $HDFS_USER --command "$HADOOP_BIN_PATH/hadoop fs -mkdir /trafodion_backups" 2> $HOME/traf_temp_output
+if [ $? != 0 ]; then
+ # ok if directory already exists
+ dir_exists=$(grep "File exists" $HOME/traf_temp_output | wc -l)
--- End diff --
I think this code could be simplified by using -p option to the -mkdir command. Then it should not give error for directory exists.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---