Skip to content

Commit

Permalink
Add suggestion of what to check.
Browse files Browse the repository at this point in the history
If uploads fail, it's most likely lost connection to the NFS, network, or the server's disk space is getting full. Add this suggestion for how to troubleshoot this issue. Return savePartition error code too for more helpful debugging/checking/troubleshooting.  Return the proper exit code on savePartition errors. It would always return 0 becuase the $? was called earlier.
  • Loading branch information
mastacontrola committed Jan 10, 2017
1 parent 26002ad commit de79515
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/web/lib/fog/system.class.php
Expand Up @@ -53,7 +53,7 @@ private static function _versionCompare()
public function __construct()
{
self::_versionCompare();
define('FOG_VERSION', '11');
define('FOG_VERSION', '12');
define('FOG_SCHEMA', 245);
define('FOG_BCACHE_VER', 111);
define('FOG_SVN_REVISION', 6052);
Expand Down
2 changes: 1 addition & 1 deletion packages/web/management/languages/messages.pot
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-09 18:57-0500\n"
"POT-Creation-Date: 2017-01-09 19:52-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down
8 changes: 5 additions & 3 deletions src/buildroot/package/fog/scripts/usr/share/fog/lib/funcs.sh
Expand Up @@ -677,7 +677,8 @@ writeImage() {
echo " * Imaging using Partclone"
pigz -d -c </tmp/pigz1 | partclone.restore --ignore_crc -O $target -N -f 1
fi
[[ ! $? -eq 0 ]] && handleError "Image failed to restore and exited with exit code $? (${FUNCNAME[0]})\n Args Passed: $*"
exitcode=$?
[[ ! $exitcode -eq 0 ]] && handleError "Image failed to restore and exited with exit code $exitcode (${FUNCNAME[0]})\n Args Passed: $*"
rm -rf /tmp/pigz1 >/dev/null 2>&1
}
# Gets the valid restore parts. They're only
Expand Down Expand Up @@ -1996,13 +1997,14 @@ savePartition() {
imgpart="$imagePath/d${disk_number}p${part_number}.img"
uploadFormat "$fifoname" "$imgpart"
partclone.$fstype -fsck-src-part -c -s $part -O $fifoname -N -f 1
case $? in
exitcode=$?
case $exitcode in
0)
mv ${imgpart}.000 $imgpart >/dev/null 2>&1
echo " * Image Captured"
;;
*)
handleError "Failed to complete capture (${FUNCNAME[0]})\n Args Passed: $*"
handleError "Failed to complete capture (${FUNCNAME[0]})\n Args Passed: $*\n Exit code: $exitcode\n Maybe check the fog server\n to ensure disk space is good to go?"
;;
esac
;;
Expand Down

0 comments on commit de79515

Please sign in to comment.