Code Monkey home page Code Monkey logo

Comments (7)

lamw avatar lamw commented on September 2, 2024

I just tested this scenario and I get the following when I have a VM with independent disk:

Final status: WARNING: All VMs backed up, but some disk(s) failed!

Can you provide a bit more details on the VM? Does it only have independent disks or does it contain regular disks? Are you trying to backup a single VM or are there others?

from ghettovcb.

omle avatar omle commented on September 2, 2024

This is weird,
I've just (after these 3 days since i've posted this issue) re-checked log files of scheduled backups - one definition contains 3 VM's, one of which has independent disk. Log file shows WARNING (the exact one you've posted), not an ERROR.
No idea where it came from earlier (output posted in the first post was copy-pasted and the error did happen, really).

Seems like I've wasted some of your time - really sorry for that.
However I'll keep an eye on this and get back in touch if it re-occurs.

Big thanks for concern and once again sorry for the "false-positive".

from ghettovcb.

lamw avatar lamw commented on September 2, 2024

No worries. Glad it's working for you

from ghettovcb.

nidez avatar nidez commented on September 2, 2024

Hi,
I'm expecting the same problem, installed 2 days ago downloading from zip package.

the report email has error statement in object:
ghettoVCB - esx2 ###### Final status: ERROR: No VMs backed up! ######

and both, WARN adn ERR in body:
013-04-05 10:07:16 -- info: Backup Duration: 1.82 Minutes
2013-04-05 10:07:16 -- info: WARN: Formica has some Independent VMDKs that can not be backed up!

2013-04-05 10:07:22 -- info: ###### Final status: ERROR: No VMs backed up! ######

do you have suggestions ?

from ghettovcb.

nidez avatar nidez commented on September 2, 2024

i'm trying to debug this by myself:

first thing i found is the getFinalStatus function, i exit on the last IF statement :
[[ $VM_OK == 0 ]]
with status: ###### Final status: ERROR: No VMs backed up! ######"

while i am expecting to exit from the 3rd IF statement:

[[ $VM_OK == 1 ]] && [[ $VM_FAILED == 0 ]] && [[ $VMDK_FAILED == 1 ]]
with status: ###### Final status: WARNING: All VMs backed up, but some disk(s) failed! ######

    #added by me for testing ...
logger "info" "debug getFinalStatus last ELIF: vm_ok ${VM_OK}\n";
logger "info" "debug getFinalStatus last ELIF: vm_failed ${VM_FAILED}\n";
logger "info" "debug getFinalStatus last ELIF: vmdk_failed ${VMDK_FAILED}\n"; 

and the output is:
2013-04-05 13:42:13 -- info: debug getFinalStatus last ELIF: vm_ok 0
2013-04-05 13:42:13 -- info: debug getFinalStatus last ELIF: vm_failed 0
2013-04-05 13:42:13 -- info: debug getFinalStatus last ELIF: vmdk_failed 1

0 0 1 while i need a 1 0 1 to exit with the correct status.
now i'm going to check where the VM_OK is going to be setted as 1,
maybe this is happening only after a FULL success of at least one virtual machine, success that i never meet because i'm using the script with the "-m vmName" param. to backup a single vm.

i'll post again after some tests.

from ghettovcb.

nidez avatar nidez commented on September 2, 2024

ok, it seems to me (IMHO) that the problem is exactly this one: at least one VM have to complete a successful backup without having indipendent disk WARNs or something else.

So if all your VMs will fall into one of this conditions:

[[ ${SNAP_SUCCESS} -ne 1 ]]
[[ ${VM_VMDK_FAILED} -ne 0 ]]
[[ ${VM_HAS_INDEPENDENT_DISKS} -eq 1 ]]

VM_OK value will be never set to 1 because this will happend after the ELSE.

this could be fine for the first 2 conditions because they are errors preventing the backup to be done, but the 3rd one is just a warning so it should be moved after the ELSE letting the VM_OK take the 1 value because i do have a working backup of at least one VM.

just my 2 cents ... let me know if i'm wrong.

Marco.
sorry for my poor english.

from ghettovcb.

nidez avatar nidez commented on September 2, 2024

i've moved the IF VM_HAS_INDEPENDENT_DISKS after the ELSE and it works now.
please report me if i've missed some side effects requiring that condition to be on its original place

i've also deleted the "create simlink for rsync" section inside that IF as it will be already executed (already written) just after the ELSE.

            if [[ ${SNAP_SUCCESS} -ne 1 ]] ; then
                logger "info" "ERROR: Unable to backup ${VM_NAME} due to snapshot creation!\n"
                [[ ${ENABLE_COMPRESSION} -eq 1 ]] && [[ $COMPRESSED_OK -eq 1 ]] || echo "ERROR: Unable to backup ${VM_NAME} due to snapshot creation" >> ${VM_BACKUP_DIR}/STATUS.error
                VM_FAILED=1
            elif [[ ${VM_VMDK_FAILED} -ne 0 ]] ; then
                logger "info" "ERROR: Unable to backup ${VM_NAME} due to error in VMDK backup!\n"
                [[ ${ENABLE_COMPRESSION} -eq 1 ]] && [[ $COMPRESSED_OK -eq 1 ]] || echo "ERROR: Unable to backup ${VM_NAME} due to error in VMDK backup" >> ${VM_BACKUP_DIR}/STATUS.error
                VMDK_FAILED=1
            else
                if [[ ${VM_HAS_INDEPENDENT_DISKS} -eq 1 ]] ; then
                    logger "info" "WARN: ${VM_NAME} has some Independent VMDKs that can not be backed up!\n";
                    [[ ${ENABLE_COMPRESSION} -eq 1 ]] && [[ $COMPRESSED_OK -eq 1 ]] || echo "WARN: ${VM_NAME} has some Independent VMDKs that can not be backed up" > ${VM_BACKUP_DIR}/STATUS.warn
                    VMDK_FAILED=1
                fi   

                logger "info" "Successfully completed backup for ${VM_NAME}!\n"
                [[ ${ENABLE_COMPRESSION} -eq 1 ]] && [[ $COMPRESSED_OK -eq 1 ]] || echo "Successfully completed backup" > ${VM_BACKUP_DIR}/STATUS.ok
                VM_OK=1
                #experimental
                #create symlink for the very last backup to support rsync functionality for additinal replication
                if [[ "${RSYNC_LINK}" -eq 1 ]] ; then
                    SYMLINK_DST=${VM_BACKUP_DIR}
                    if [[ ${ENABLE_COMPRESSION} -eq 1 ]] ; then
                        SYMLINK_DST1="${RSYNC_LINK_DIR}.gz"
                    else
                        SYMLINK_DST1=${RSYNC_LINK_DIR}
                    fi
                    SYMLINK_SRC="$(echo "${SYMLINK_DST%*-*-*-*_*-*-*}")-symlink"
                    logger "info" "Creating symlink \"${SYMLINK_SRC}\" to \"${SYMLINK_DST1}\""
                    ln -sf "${SYMLINK_DST1}" "${SYMLINK_SRC}"
                fi

                #storage info after backup
                storageInfo "after"
            fi

2013-04-05 14:20:07 -- info: Initiate backup for Formica
2013-04-05 14:20:07 -- info: Creating Snapshot "ghettoVCB-snapshot-2013-04-05" for Formica
Destination disk format: VMFS thin-provisioned
Cloning disk '/vmfs/volumes/Storage_Farm/Formica/Formica.vmdk'...
Clone: 90% done.
2013-04-05 14:21:33 -- info: Removing snapshot from Formica ...
2013-04-05 14:21:33 -- info: Backup Duration: 1.43 Minutes
2013-04-05 14:21:33 -- info: WARN: Formica has some Independent VMDKs that can not be backed up!
2013-04-05 14:21:33 -- info: Successfully completed backup for Formica!
2013-04-05 14:21:39 -- info: ###### Final status: WARNING: All VMs backed up, but some disk(s) failed! ######
2013-04-05 14:21:39 -- info: ============================== ghettoVCB LOG END ================================

from ghettovcb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.