**9.1.3 Upgrade Tips** Console Tool Log Shows There are unscheduled tasks

Document created by Christopher_Walsh Employee on Aug 7, 2014
Version 1Show Document
  • View in full screen mode

Summary
When upgrading from RA 9.0.161 to NFA 9.1.3 you must run the Console Tool(consoletool-exe.jar) on the NFA console before starting to upgrade any servers. This tool is included with the NFA console software download.

This will copy the necessary data from the RA Console to the RA Harvester's database to prep for the upgrade.

This will also check the database_servers_scheduler table for any "unfinished" tasks.

There was an issue in RA 9.0.161 where if the Merge button was clicked too many times it may cause all future merges to occur. If there are merge/delete tasks in the database_servers_schedule table from the above mentioned issue it will cause the error below in the Console tool log file:

[ALWAYS  ] - There are unscheduled tasks in the system which could cause migrations to fail. Please contact CA Support for further assistance.

Solution
The solution to this is to delete the rows fromm the database_servers_scheduler table that have not completed yet.

1)To do this you can use the query below to first verify that this is the case:

mysql -P3308 reporter

SELECT * FROM database_servers_scheduler WHERE command IN ('MERGE INTERFACE', 'DELETE INTERFACE') AND started = 0;

2)If any results are returned that show 'MERGE INTERFACE' or 'DELETE INTERFACE' tasks, then delete these rows by running:

DELETE FROM database_servers_scheduler WHERE command IN ('MERGE INTERFACE', 'DELETE INTERFACE') AND started = 0;



3)If you run the console tool again, the error should now be cleared and the Harvesters should be updated with the information they need to start the upgrade. If there are any other errors in the Console Tool Log, make note of them and contact CA Support.

4) (Optional)If you want to go back and check the results returned in the query from step 1 you can use the query below to see which interfaces did not merge and did not delete and you can merge and/or delete them again through the 'RA/NFA Adminstration->Phsyical & Virtual Interfaces' Page.


If you look at the CommandArguments column of the query in step 1 you will see it lists the SourceInterfacedID and the DestinationInterfaceID. Use these ID numbers in the query below hwere 'x' is the SourceInterfaceID and 'y' is the DestinationInterfaceId:

select * from agents_all_view where id in(x, y);

This will show you details about which Router, ifindex, etc the task was trying to merge or delete.

Below is an example of how to form the query, where the SourceInterfaceId was 170 and the DestinationInterfaceID was 171.



5) (Optional) If need be you can use this information to go back to the RA/NFA GUI and Merge and/or Delete the interfaces again either before or after the upgrade.


Note, it usually best practice to always back up your database before making any direct updates or delete statements.

In this case you can make a backup of just the affected table with the query below:

mysql -P3308 reporter

create table backup_database_servers_scheduler select * from database_servers_scheduler;


This will dump everything in the backup table which you can restore later if needed.
This has also been published as a KB article on support.ca.com here: TEC598250
If you want, this can be done in one step:

mysql -P 3308 -D reporter -e "create table backup_database_servers_scheduler select * from database_servers_scheduler;"

You can also take an offline copy using mysqldump:

mysqldump -P 3308 reporter database_servers_scheduler > database_servers_scheduler.sql

This will create a file that can be restored using:

mysql < database_servers_scheduler.sql

 

This document was generated from the following discussion: **9.1.3 Upgrade Tips** Console Tool Log Shows There are unscheduled tasks

Attachments

Outcomes