Monday, June 27, 2016

Installing the ICD Demo Content along with the ICD Process Content Packs

If you try to install the IBM Control Desk Content Packs along with the 7.5.1 Demo Content, you're going to have problems. I already addressed a standalone problem with the Demo Content in an earlier post, and now I've gotten further, so wanted to share the wisdom I gained.

No matter which order you install - Demo Content then Process Packs (specifically the Change Management Content Pack) or the other way around - you're going to encounter the following error:

One or more values in the INSERT statement, UPDATE statement, or foreign key update caused by a DELETE statement are not valid because the primary key, unique constraint or unique index identified by "1" constrains table "MAXIMO.PLUSPSERVAGREE" from having duplicate values for the index key.. SQLCODE=-803, SQLSTATE=23505, DRIVER=4.11.69


The cause for this is that the Change Management Content Pack and also the Service Desk Content Pack specify hard-coded values for PLUSPSERVAGREEID in the DATA\PLUSRESPPLAN.xml file, when the inserts should be creating and using the next value of the PLUSPSERVAGREESEQ sequence.

In finding the above root cause, it means that there are two possible solutions to the problem, depending on the order you install things.

If you install the Content Packs before the Demo Content


So in my first run, I installed the Content Packs first, and then the Demo Content (after modifying it as explained in an earlier post). And the exact SQL statement causing this problem was:

SQL = [insert into pluspservagree ( active,calendar,changeby,changedate,createby,createdate,description,hasld,intpriorityeval,intpriorityvalue,langcode,objectname,orgid,ranking,sanum,pluspservagreeid,servicetype,shift,slanum,calendarorgid,slatype,status,statusdate,slaid,slahold,stoprpifjportt,billapprovedwork) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,nextval for PLUSPSERVAGREESEQ,?,?,?,?,?,?,?,?,?,?,0)]
 parameter[1]=1
 parameter[2]=BUS01
 parameter[3]=MAXADMIN
 parameter[4]=2007-10-12 12:33:55.0
 parameter[5]=MAXADMIN
 parameter[6]=2007-10-12 12:33:55.0
 parameter[7]=P1 Incident - Respond in 30 mins. Resolve in 2 hrs.
 parameter[8]=0
 parameter[9]=EQUALS
 parameter[10]=1
 parameter[11]=EN
 parameter[12]=INCIDENT
 parameter[13]=PMSCIBM
 parameter[14]=100
 parameter[15]=SRM1002
 parameter[16]=SLA
 parameter[17]=BUSDAY
 parameter[18]=SRM1002
 parameter[19]=PMSCIBM
 parameter[20]=CUSTOMER
 parameter[21]=ACTIVE
 parameter[22]=2011-09-14 13:26:13.247
 parameter[23]=1
 parameter[24]=0
 parameter[25]=0


To find the constraint causing the problem, I found this page:

https://bytes.com/topic/db2/answers/810243-error-messages-key-constraint-violations

Which showed that I could find the particular constraint with the following SQL:

SELECT INDNAME, COLNAMES
FROM SYSCAT.INDEXES
WHERE IID = 1
AND TABNAME = 'PLUSPSERVAGREE'

That basically showed an index named SQL160607091434350 consisting of just the column named PLUSPSERVAGREEID.

So each row in the PLUSPSERVAGREE table should have a unique value in the PLUSPSERVAGREEID column.


Then to find the existing values in the PLUSPSERVAGREEID column of the PLUSPSERVAGREE table, run:

SELECT PLUSPSERVAGREEID from PLUSPSERVAGREE

For me, this showed values 1 through 16.

Now, looking at the sequence itself, I found that the last value assigned was 5 with this query:

SELECT LASTASSIGNEDVAL from sysibm.syssequences where seqname = 'PLUSPSERVAGREESEQ'

So to fix the problem, I altered the PLUSPSERVAGREESEQ sequence to start at 17:

ALTER SEQUENCE PLUSPSERVAGREESEQ RESTART WITH 17

After I did that, I tried again to install the Demo Content and it worked!

If you installed the Demo Content first

I take lots of snapshots of my VMs, so I could easily go back to a snapshot where I had already installed the Demo Content, to then try to install the Content Packs. That led me to see that the Change Management Content Pack has hardcoded values in the DATA\PLUSRESPPLAN.xml file (by downloading the ChangeMgtPack7.6.zip file and opening up the file). On the positive side, it appears that nothing else in the Content Pack actually references these hardcoded values, so we have the option of changing them as needed.

In my particular case, I found that the following values in the PLUSPSERVAGREE table for the PLUSPSERVAGREEID column

9
10
11
12
13
14
24
25

I also found that the LASTASSIGNEDVAL for the PLUSPSERVAGREESEQ sequence was 25, so that matches up with the data.

The very lucky part for me is that there are exactly 8 rows that get inserted by the PLUSRESPPLAN.xml file, and the PLUSPSERVAGREE table doesn't have any rows with values 1 through 8!

So the solution I applied was I manually edited the PLUSRESPPLAN.xml file to set the PLUSPSERVAGREEID values to 1 through 8. Then I saved the edited file back into the zip file, created a valid ContentSource.xml file to point to it (so I could install from my local copy of the Content Pack), added my new Content Source to the Content Installer, and I was able to successfully install the Change Process Content Pack!

However, I then found that there's also a similar problem with the Service Desk Content Pack, but the same solution can't be applied. Specifically, in the Service Desk Content Pack, the DATA\SLA.xml file uses hardcoded values for the same column, but those values are 1, 3, 4 and 5, which I just used in my workaround for the Change Management Content Pack. So to fix this correctly, I looked in the Demo Content Content Pack to find out how to reference the PLUSPSERVAGREESEQ sequence, and it's actually not too bad.

So the fix I went through was to manually modify the DATA\SLA.xml file to change every element that looked like this:

<column dataType="java.lang.Long" name="PLUSPSERVAGREEID">
      <value>3</value>
    </column>

to this:

<column dataType="java.lang.Long" name="PLUSPSERVAGREEID">
    <columnOverride>
        <sequence mode="nextval" name="PLUSPSERVAGREESEQ"/>
      </columnOverride>
    </column>

Then like above, I saved the edited file back into the zip file, created a valid ContentSource.xml file to point to it (so I could install from my local copy of the Content Pack), added my new Content Source to the Content Installer, and I was able to successfully install the Service Desk Content Pack!

After installing, I checked the PLUSPSERVAGREE table again, and I saw that the values 26 through 29 were there, so I know my change worked.

So in my case I didn't have to change the start value for the PLUSPSERVAGREESEQ sequence, which is nice.

It was a painful afternoon, but well worth it in the end.

Wednesday, June 8, 2016

Installing ITIC and TDI on Windows Server 2012

Both of these tools use the ZeroG InstallAnywhere installer, which doesn't completely get along with Windows Server 2012. Luckily, there's an easy fix within Windows. You need to set the "Compatibility mode" to run with compatibility for "Windows 7". You need to perform this procedure on the setup.exe file for ITIC (under Install\ITIC wherever you've extracted the install images) and the install_tdiv71_win_x86_64.exe file in the TDI installer directory.

On each file, right click and select Properties.

Then on the Compatibility tab, click the "Change settings for all users" button at the bottom.

In the "Compatibility mode" section, select "Run this program in compatibility mode for:" checkbox.

Select "Windows 7" from the drop down list.

Click OK, then OK again.

And now you're ready to install

UPDATE: You do also need to ensure that the java executable is in your path. If not, it will fail when trying to create the Java Virtual Machine.

Tuesday, June 7, 2016

Installing SmartCloud Control Desk 7.5.1 Demo Content on ICD 7.6

You can't do it

That's the short answer, but I've figured out how to get it at least partially installed, and that's why I've created this blog post.

But you can, mainly, with a little work

Add an attribute to the TICKET table

You need to add an attribute named RBA_RC to the TICKET table. Its type needs to be ALN and its length set to 50. This attribute no longer exists, but the demo content requires it. You may want to take a different route to solve this problem, but this was the easiest one I could think of.

Remember, after adding this attribute, you need to set Admin Mode to ON, Apply Configuration Changes, then set Admin Mode to OFF.

Download the package

First, you need to download the content pack ZIP file itself from here:

https://www-304.ibm.com/software/brandcatalog/ismlibrary/details?catalog.label=1TW10CO0A

Edit the package

You've got the entire package downloaded, but if you just try to install it, you will fail. So you need to edit the file named Package/ImportPackage.xml within the zip file. You can edit it in vi, Notepad, gedit, etc. - any text editor you want. What you need to do is delete lines 408 through 717 (leaving the last line that reads "</package>"). The reason for this is that the first error when importing was on line 408. I tried de-selecting different options through the GUI, but was not successful. My choice to simply delete these lines was made only after 40-50 other attempts.

After editing the file, add it pack to the zip file.

Define your local content and Install

  1. Create an XML file called ContentSource.xml in the C:\temp directory on your Smartcloud Control Desk server system that contains the following text:
    <?xml version="1.0" encoding="UTF-8"?>
    <catalog infourl="" lastModified="" owner=""
      xmlns:tns="http://www.ibm.com/tivoli/tpae/ContentCatalog"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="ContentCatalog.xsd">
      <catalogItem>
        <version>7.5.1</version>
        <type>mriu</type>
        <name>Enter the name of package</name>
        <description>Enter a description of the package here</description>
        <homepage/>
        <licenseurl/>
        <category>Describe the category of the content</category>
        <url>file:////C:\temp\TestPackage.zip</url>
      </catalogItem> 
    </catalog>
  2. Edit the name and description and the category according to the content that you are installing. Change the file name in the URL to the name of the content pack zip file.
  3. Save the file.
  4. Copy the content pack zip file to the C:\temp directory on the server.
  5. Go to the ISM Content Installer application: System Configuration>IBM Content Installer.
  6. Click the New icon.
  7. Enter the location of the ContentSource.xml that you created in step 1 and a description. The file name in our example is:  file:////c:\temp\ContentSource.xml
  8. Click Save.
  9. Click the newly created content source.
  10. Click the download link to install the content.

You've now got a good amount of demo content

You don't have everything from the original content pack, but you've got a lot more than you started with. Good luck.

Monday, June 6, 2016

IBM Control Desk for Service Providers

One of the many features of IBM Control Desk that separates it from the competition is its ability to support Service Providers. It does this by allowing you to secure information on a per-customer basis. For this blog post, I wanted to show a couple of multi-customer scenarios in the product. Specifically, I wanted to show a customer-specific user logging in and only seeing that customer's assets. Additionally, I wanted to show a software license being assigned to that customer-owned asset and how it appears. The screenshots associated with those are shown here:

Create a customer named ACME CORP






Now create a Person who is associated with ACME CORP.





The Cust/Vendor field is farther down on the page.


Now create a user that is associated with that Person.


Now create a Security Group (SP) with any permissions you want, but specify "Authorize Group for Customer on User's Person record". I only granted Read access to the Assets application. And add your user to this group.


Here I'm logged in as the user, and can only see the one asset associated with ACME CORP.


Here I'm viewing the Licenses (SP) application for Adobe Acrobat and see that a license has been allocated to ITAM1010, which is the asset associated with ACME CORP.


Friday, April 22, 2016

Configuring ITIC for use with IBM Control Desk 7.6

As shipped with ICD 7.6 (at least on Linux x86 64-bit), ITIC isn't quite configured correctly. When you try to run startFusion.sh, it will complain that it cannot file the main class. The problem lies in the init.sh script. Specifically, you need to change the following line:

FSNBUILD=7510

to

FSNBUILD=7600

Without this change, it's trying to find a file named IntegrationComposer7510.jar, which doesn't exist. In 7.6, the correct file is IntegrationComposer7600.jar.

Another thing to note is the URL of the BigFix server for use with the ITIC mapping is:

https://hostname-or-ipaddress:52311


The easiest way to work around the problem of having one VM on a NAT network and one on a host-only network in VMWare Workstation

The Situation


I have a BigFix environment with a Windows BigFix server on the host-only network, and I've got IBM Control Desk installed on a Red Hat VM on one of the NAT networks. I want to integrate the two for asset management, which requires the Integration Composer, which has to communicate with both servers simultaneously. (We've done an air-gapped integration for a couple of customers, but I wanted to use the out-of-the-box mechanism).

Bad Solutions

Some of the solutions that I considered, but threw out because of the work involved:

Change an IP address

Simply move one server to the other network and then add routes to communicate between different subnets IP addresses on the same network

Easy Solution

I added a network card on the NAT network to the BigFix Windows server. VMWare Workstation quickly suspended and resumed the VM, the adapter was seen, and it got a DHCP address on the NAT network. And then I could communicate between the two machines!

Tuesday, April 19, 2016

Installing IBM Control Desk v7.6 on Red Hat Enterprise Linux 6.6

I just had a difficult time installing ICD 7.6 on RHEL 6.6 and wanted to share one workaround that I used that finally got me around the prerequisite checker failures on Installation Manager.

I've done this successfully in a production environment, but in this case I'm installing this in a VM in my lab that's running under VMWare Workstation, and it's on a NAT network. Every time the Installation Manager runs the prerequisite checker, I kept getting a failure on network.fqdn, even though the hostname was absolutely set to a fully qualified domain name (icd76.mynet.foo). So I started up 'dnsmasq' locally and pointed to my own IP address as my DNS server. That allowed network.fqdn to PASS, but then network.dns would FAIL (!).

Figuring I have my networking configured "good enough" for my small test machine, I simply edited the following files:

PAD_07060000.cfg
PAW_07060000.cfg

in the directory /var/ibm/InstallationManager/bundles/plugins/com.ibm.tivoli.pae.prereq 1.0.1.20157141414/com/ibm/tivoli/pae/prereq/SystemRequirements/unix/ to change:

network.dns=True

to

network.dns=False

And then it worked like a champ!

How did you find those buried files?

If you cd to /var/ibm/InstallationManager/logs and run 'firefox index.xml', you get a great view of all of the Installation Manager log files. In the latest one, the completion message pointed me basically to that directory.