Chapter 1. Open Automation Troubleshooting

Troubleshooting

Debugging Open Automation

Setting Up the Open Automation Debug Configuration

Preface

Audience

Conventions

Documentation Feedback

Obtaining Documentation and Submitting a Service Request

Copyright Page

Chapter 1. Open Automation Troubleshooting

- Troubleshooting

- Debugging Open Automation

Troubleshooting

How do I verify if my module was registered with the platform?

Recommended Solution

Enable com.cloupia.service.cIM.inframgr=DEBUG under the logging.properties file, in the /opt/infra/inframgr directory. If debug was enabled you will find: jar to be loaded:jar:, as well as "Loading feature class." If you do not find the following error "Error while loading feature classes for " after a few lines, then your module was added successfully.

They can check whether the module features are getting uploaded successfully in UCSD after uploading zip file and restarting the UCSD by verifying the following 3 items existence in /opt/infra/inframgr/features folder <moduleId>.feature file example ‹>dummy.feature Feature-<moduleId>.jar example ‹> feature-dummy.jar <moduleId> folder example ‹> dummy

How do I verify if my report was registered successfully?

Recommended Solution

Enable log4j.logger.com.cloupia.service.cIM.inframgr.reports.simplified=DEBUG to view the status of the report registration.

I'm not able to select a pod.

Recommended Solution

You must provide the Pod.xml file to define your own pod, and make sure it is the correct UCS Director POD type. If you provide your own Pod.xml, the account create must come under your custom pod.xml.

What do I do if the module is not loading?

Recommended Solution

If your module is not loading, check the following:

initDynamicFeatures(FeatureContainer.java:295) - Loading feature class com.cisco.feature.tempOA.TempOAModule from feature definition file /opt/infra/inframgr/features/TempOA.feature
2015-08-17 20:58:57,258 [main] ERROR initDynamicFeatures(FeatureContainer.java:317) - Error while loading feature classes for /opt/infra/inframgr/features/TempOA.feature
java.lang.ClassNotFoundException: com.cisco.feature.tempOA.TempOAModule
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at com.cloupia.service.cIM.inframgr.FeatureContainer.initDynamicFeatures(FeatureContainer.java:305)
at com.cloupia.service.cIM.inframgr.FeatureContainer.loadFeatures(FeatureContainer.java:197)
at com.cloupia.service.cIM.inframgr.FeatureContainer.<init>(FeatureContainer.java:52)
at com.cloupia.service.cIM.inframgr.FeatureContainer.<clinit>(FeatureContainer.java:37)
at com.cloupia.service.cIM.inframgr.InfraMgrImpl.initService(InfraMgrImpl.java:738)
at com.cloupia.service.cIM.inframgr.APIProvider.initService(APIProvider.java:217)
at com.cloupia.fw.services.provider.ServiceProvider.init(ServiceProvider.java:520)
at com.cloupia.fw.services.provider.ServiceProvider.init(ServiceProvider.java:293)
at com.cloupia.fw.services.provider.ServiceProvider.init(ServiceProvider.java:267)
at com.cloupia.service.cIM.inframgr.InfraMgrMain.main(InfraMgrMain.java:176)

If you find this error in your log file, check the module name in the .feature file. Either the path or the module file name is wrong. Verify that the class does not end with .java.

The report displays incorrectly in the menu.—Identify the problem here.

Recommended Solution

Enable the log4j.logger.com.cloupia.service.cIM.inframgr.reports.simplified=DEBUG package to view the following logs:

Creating Simple Tabular Report Entry for compute.ComputeTabReport
2015-08-13 16:48:38,956 [main] DEBUG createEntry(ReportRegistryProxy.java:370) - ***************Registering Report compute.ComputeTabReport******************************
2015-08-13 16:48:38,956 [main] DEBUG createEntry(ReportRegistryProxy.java:371) - Report name : compute.ComputeTabReport
2015-08-13 16:48:38,957 [main] DEBUG createEntry(ReportRegistryProxy.java:372) - Report Type : 2
2015-08-13 16:48:38,957 [main] DEBUG createEntry(ReportRegistryProxy.java:373) - Is config table false
2015-08-13 16:48:38,957 [main] DEBUG createEntry(ReportRegistryProxy.java:387) - Implementation class : class com.cloupia.feature.compute.reports.ComputeTabReportGenerator
2015-08-13 16:48:38,957 [main] DEBUG createEntry(ReportRegistryProxy.java:389) - Report label ComputeTabReport
2015-08-13 16:48:38,957 [main] DEBUG createEntry(ReportRegistryProxy.java:391) - Show in summary false
2015-08-13 16:48:38,958 [main] DEBUG createEntry(ReportRegistryProxy.java:393) - Map Rules UCSM_COMPUTE, 90305
2015-08-13 16:48:38,958 [main] DEBUG createEntry(ReportRegistryProxy.java:396) - Menu ID 50
2015-08-13 16:48:38,958 [main] DEBUG createEntry(ReportRegistryProxy.java:398) - Context level -1
2015-08-13 16:48:38,959 [main] DEBUG createEntry(ReportRegistryProxy.java:400) - Management report false
2015-08-13 16:48:38,959 [main] DEBUG createEntry(ReportRegistryProxy.java:402) - Embedded report true
2015-08-13 16:48:38,959 [main] DEBUG createEntry(ReportRegistryProxy.java:410) - Report priority : 5
2015-08-13 16:48:38,959 [main] DEBUG createEntry(ReportRegistryProxy.java:419) - Management column index -1
2015-08-13 16:48:38,960 [main] DEBUG createEntry(ReportRegistryProxy.java:425) - Operation level no_check

If you didn't override the getMapRules API for your report, then you will see the report registered under GlobalAdmin context. Your logs should be similar to the following logs:

Processing hierarchy for report  compute.ComputeEasyReport @ Menu ID: 50
2015-08-13 16:48:38,960 [main] DEBUG preProcessReportHierarchy(ReportRegistryProxy.java:129) - Setting map rule global_admin,10
2015-08-13 16:48:38,978 [main] DEBUG preProcessReportHierarchy(ReportRegistryProxy.java:144) - The Dynamic context level to be used -1
2015-08-13 16:48:38,978 [main] DEBUG registerReportWithActions(ReportRegistryProxy.java:171) - Registering Report compute.ComputeEasyReport as a ConfigTable report
2015-08-13 16:48:38,978 [main] DEBUG registerReportWithActions(ReportRegistryProxy.java:175) - No Actions are defined for the report compute.ComputeEasyReport
2015-08-13 16:48:38,979 [main] DEBUG createConfigTable(ReportRegistryProxy.java:197) - Generating Config Table definition
2015-08-13 16:48:38,979 [main] DEBUG createConfigTable(ReportRegistryProxy.java:203) - The report context type -1
2015-08-13 16:48:38,979 [main] DEBUG createConfigTable(ReportRegistryProxy.java:207) - The Report entry context 10
2015-08-13 16:48:38,979 [main] DEBUG createConfigTable(ReportRegistryProxy.java:209) - The Management column 0
2015-08-13 16:48:38,980 [main] DEBUG createConfigTable(ReportRegistryProxy.java:211) - The Display column 1
2015-08-13 16:48:38,980 [main] DEBUG createEntry(ReportRegistryProxy.java:370) - ***************Registering Report compute.ComputeEasyReport.config******************************

How do I verify that my module features were uploaded successfully?

After restarting UCS Director, verify that the following files are in the /opt/infra/inframgr/features directory:

- <moduleId>.feature

- Feature-<moduleID>.jar

- <moduleID>folder

UCS Director is does not restart successfully after uploading the module.zip file.

- Delete the zip file from the/opt/infra/uploads folder directory.

- Analyze the logs.

- Update your module code.

- Reload the zip file.

- Restart UCS Director.

Debugging Open Automation

When you are debugging, you can trace problems through inframgr (Infra Manager) logs. You can get the inframgr logs through either the Cisco UCS Director Shell menu or the Cisco UCS Director GUI.

To use the shell admin approach:

- Open the Cisco UCS Director Shell menu.

- Choose 18, Tail Inframgr logs.

To use the Cisco UCS Director GUI:

- Log in to the Cisco UCS Director GUI.

- Navigate to Administration > Support Information.

- Click System Information and Logs Link Page.

- In the Cisco UCS Director Product System Information form, from the drop-down menu, choose Infra Manager and click Show Log.

Before You Begin

You will need shell admin access in order to use the debugging functions that are available in the Cisco UCS Director Shell menu (also known as shell admin). Refer to Deploying the Module on Cisco UCS Director, for more details about access to and use of the Cisco UCS Director Shell menu.

- Setting Up the Open Automation Debug Configuration

Setting Up the Open Automation Debug Configuration

Perform the following steps to setup the debug configuration for an Open Automation project and run the application on debug mode.

Procedure

Step 1

Add the following line in bold next to java in the /opt/infra/inframgr/run.sh script.

java -Xdebug -agentlib:jdwp=transport=dt_socket,address=<port-number>,server=y,suspend=n -Xmx4096m -Xmx4096m -Djava.security.manager -Djava.security.policy=security.policy -verbose:gc

Step 2

Replacing <port-number> with the port number you want to use, then save the file.

Step 3

Create a debug configuration, by right clicking on your Open Automation project you Eclipse IDE and selecting Debug As >Debug Configurations.
Debug Configuration

Step 4

To create remote java application configuration, select Remote Java Application and click New.

Step 5

Provide a name for the debug configuration.

Step 6

Click browse at Project field and choose your Open Automation project.

Step 7

In the Connection Type field, leave it as Standard (Socket Attach).

Step 8

Provide your VM IP address and port number specified in the run.sh file.

Step 9

Click Apply.

Step 10

Add a breakpoint in your module.java class or any of your module code.

Step 11

Start UCS Director, by running the shelladmin using option 4 – Start Services.

Step 12

In your Eclipse IDE, right click on your Open Automation project and select Debug As > Remote Java Application Configuration Created.

Step 13

Click Debug to start the debug session.

Preface

This preface contains the following sections:

- Audience

- Conventions

- Documentation Feedback

- Obtaining Documentation and Submitting a Service Request

Audience

This guide is intended primarily for data center administrators who use Cisco UCS Director and who have responsibilities and expertise in one or more of the following:

- Server administration

- Storage administration

- Network administration

- Network security

- Virtualization and virtual machines

Conventions

Text Type

Indication

GUI elements

GUI elements such as tab titles, area names, and field labels appear in this font.

Main titles such as window, dialog box, and wizard titles appear in this font.

Document titles

Document titles appear in this font.

TUI elements

In a Text-based User Interface, text the system displays appears in this font.

System output

Terminal sessions and information that the system displays appear in this font.

CLI commands

CLI command keywords appear in this font.

Variables in a CLI command appear in this font.

[ ]

Elements in square brackets are optional.

{x | y | z}

Required alternative keywords are grouped in braces and separated by vertical bars.

[x | y | z]

Optional alternative keywords are grouped in brackets and separated by vertical bars.

string

A nonquoted set of characters. Do not use quotation marks around the string or the string will include the quotation marks.

< >

Nonprinting characters such as passwords are in angle brackets.

[ ]

Default responses to system prompts are in square brackets.

!, #

An exclamation point (!) or a pound sign (#) at the beginning of a line of code indicates a comment line.

Note

Means reader take note. Notes contain helpful suggestions or references to material not covered in the document.

Tip

Means the following information will help you solve a problem. The tips information might not be troubleshooting or even an action, but could be useful information, similar to a Timesaver.

Caution

Means reader be careful. In this situation, you might perform an action that could result in equipment damage or loss of data.

Timesaver

Means the described action saves time. You can save time by performing the action described in the paragraph.

Warning

IMPORTANT SAFETY INSTRUCTIONS

This warning symbol means danger. You are in a situation that could cause bodily injury. Before you work on any equipment, be aware of the hazards involved with electrical circuitry and be familiar with standard practices for preventing accidents. Use the statement number provided at the end of each warning to locate its translation in the translated safety warnings that accompanied this device.

SAVE THESE INSTRUCTIONS

Documentation Feedback

To provide technical feedback on this document, or to report an error or omission, please send your comments to ucs-director-docfeedback@cisco.com. We appreciate your feedback.

Obtaining Documentation and Submitting a Service Request

For information on obtaining documentation, submitting a service request, and gathering additional information, see the monthly What's New in Cisco Product Documentation, which also lists all new and revised Cisco technical documentation.

Subscribe to the What's New in Cisco Product Documentation as a Really Simple Syndication (RSS) feed and set content to be delivered directly to your desktop using a reader application. The RSS feeds are a free service and Cisco currently supports RSS version 2.0.

THE SPECIFICATIONS AND INFORMATION REGARDING THE PRODUCTS IN THIS MANUAL ARE SUBJECT TO CHANGE WITHOUT NOTICE. ALL STATEMENTS, INFORMATION, AND RECOMMENDATIONS IN THIS MANUAL ARE BELIEVED TO BE ACCURATE BUT ARE PRESENTED WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. USERS MUST TAKE FULL RESPONSIBILITY FOR THEIR APPLICATION OF ANY PRODUCTS.

THE SOFTWARE LICENSE AND LIMITED WARRANTY FOR THE ACCOMPANYING PRODUCT ARE SET FORTH IN THE INFORMATION PACKET THAT SHIPPED WITH THE PRODUCT AND ARE INCORPORATED HEREIN BY THIS REFERENCE. IF YOU ARE UNABLE TO LOCATE THE SOFTWARE LICENSE OR LIMITED WARRANTY, CONTACT YOUR CISCO REPRESENTATIVE FOR A COPY.

The Cisco implementation of TCP header compression is an adaptation of a program developed by the University of California, Berkeley (UCB) as part of UCB's public domain version of the UNIX operating system. All rights reserved. Copyright © 1981, Regents of the University of California.

NOTWITHSTANDING ANY OTHER WARRANTY HEREIN, ALL DOCUMENT FILES AND SOFTWARE OF THESE SUPPLIERS ARE PROVIDED “AS IS" WITH ALL FAULTS. CISCO AND THE ABOVE-NAMED SUPPLIERS DISCLAIM ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THOSE OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OR ARISING FROM A COURSE OF DEALING, USAGE, OR TRADE PRACTICE.

IN NO EVENT SHALL CISCO OR ITS SUPPLIERS BE LIABLE FOR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, OR INCIDENTAL DAMAGES, INCLUDING, WITHOUT LIMITATION, LOST PROFITS OR LOSS OR DAMAGE TO DATA ARISING OUT OF THE USE OR INABILITY TO USE THIS MANUAL, EVEN IF CISCO OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

Any Internet Protocol (IP) addresses and phone numbers used in this document are not intended to be actual addresses and phone numbers. Any examples, command display output, network topology diagrams, and other figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses or phone numbers in illustrative content is unintentional and coincidental.

Cisco and the Cisco logo are trademarks or registered trademarks of Cisco and/or its affiliates in the U.S. and other countries. To view a list of Cisco trademarks, go to this URL: Click Here . Third-party trademarks mentioned are the property of their respective owners. The use of the word partner does not imply a partnership relationship between Cisco and any other company. (1110R)