This article provides a way to remove the invalid tasks by means of editing the vCenter Server database.
Symptoms:
Check Notification tasks are triggered in vCenter Server 7.x
The tasks cannot be edited or removed
The user gets check notification emails
The vCenter Server was upgraded from 6.7.x to 7.0.x.
VMware vCenter Server 7.0.x
The "VMware vSphere Lifecycle Manager Check Notification" task has been deprecated from the 7.0 release. The vSphere Client does not have the option to edit this task.
In 7.0 U2, the UI to set the check-notification schedule is removed. However, on the upgrade from 6.7 to 7.0, this task and schedule may remain in the DB. This creates an issue, as this cannot be edited from UI and keeps sending emails.
NOTE: Please ensure that a fresh backup or offline snapshot of the vCenter was created before proceeding with the steps below. In case the vCenter is part of a Linked Mode replication setup, please be aware that all members of the Linked Mode group need to be backed up/snapshotted.
# shell
# service-control --stop vmware-updatemgr
# PGPASSWORD=$(cat /usr/lib/vmware-updatemgr/bin/configvalues.txt | grep "db_password" | awk -F'(db_password=)' '{ print $2 }') /opt/vmware/vpostgres/current/bin/psql -U vumuser -d VCDB
# delete from vci_textfiles where keystr='integrity.NewUpdateConfigSpec_Notification';
VCDB=> delete from vci_textfiles where keystr='integrity.NewUpdateConfigSpec_Notification';
DELETE 1
# service-control --start vmware-updatemgr
Workaround:
Alternatively, if the method above fails, the task can also be removed from the vCenter task scheduler. Please be aware that this method however does require a restart of the vCenter Server service (VPXD), and plan accordingly:
# /opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres -c "select scheduledtask_id,name,description from vpx_scheduledtask;"
# /opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres -c "delete from vpx_sched_action where scheduledtask_id = <id>;"
# /opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres -c "delete from vpx_sched_scheduler where scheduledtask_id = <id>;"
# /opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres -c "delete from vpx_scheduledtask where scheduledtask_id = <id>;"
# service-control --restart vmware-vpxd
# service-control --restart vmware-updatemgr