Introduction
This document describes how to solve Cronjob error autoupgrade in Cisco CloudCenter (CCC).
Prerequisites
Requirements
Cisco recommends that you have knowledge of these topics:
- CCC
- Linux
- Virtual Machines (VM)
Components Used
The information in this document is based on these softwares:
- CCC version 4.3
- CCC version 4.6
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, ensure that you understand the potential impact of any command.
Background Information
Cron deamon executes every 20 minutes every hour inside every Virtual Machine (VM) deployed from CCC. This cron file fails because the variable used to fetch the update URL is missing from the time of the deployment. The variable agentAutoUpgradeURL was used in versions 4.2 and before, but it's not used anymore from 4.5 and up. This is the reason why this variable is set to null on these deployments. Every 20 minutes the error output of this cron file is recorded into /var/spool/mail/root.
The same script also fills /var/log/messages with some constant logs if jetty agent is down. Such as:
Nov 15 12:58:01 cliqr-centos6-base-image OSMOSIX: Is user data ready + 000
Nov 15 12:58:06 cliqr-centos6-base-image OSMOSIX: Is user data ready + 000
Nov 15 12:58:11 cliqr-centos6-base-image OSMOSIX: Is user data ready + 000
Key Files
/etc/cron.d/agent-upgrade
Tells the system to run this file every 20 minutes:
/root/agent-auto-upgrade.sh
The output of this is recorded to this file every 20 minutes, quickly fills up:
/var/spool/mail/root
Which is the default directory of all mail messages of user root:
/usr/local/osmosix/etc/user-data
The file where this variable was declared on older versions, It is now set to NULL. Look for agentAutoUpgradeURL:null.
Error Message
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 -::- -::- -::- 0
100 421 100 421 0 0 74924 0 -::- -::- -::- 84200
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 -::- -::- -::- 0curl: (6) Could not resolve host: agentAutoUpgradeURL; Unknown error
WorkAround
Comment the schedule line from the file /etc/cron.d/agent-upgrade
vi /etc/cron.d/agent-upgrade
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/root
#18,38,58 * * * * root source /root/agent-auto-upgrade.sh && upgrade
Solution
This is planned to be fixed on version 4.8.0