Tuesday, March 23, 2010

Importing MPs with the MP Catalog Web Service and dependencies

Even though the possibility to import MPs right away from the OpsMgr R2 Console can be a great feature (always RTFM FIRST before importing/updating ANY MP!!!) sometimes it does not work as it should. When updating/importing a MP two ‘runs’ are needed. The first run shows some error messages and the second run goes well.

Since I do get questions from some of my customers about this I have written this blog posting. And today, when updating the Server OS MP in one of mine test environments, I also needed two runs in order to get it right. So I had the change to get some nice screenshots for this posting.

Lets take a look. First I will show what happens and then I will explain why it happens.

First I connected from the OpsMgr R2 Console to the MP Catalog Web Service. I selected the option to check for any updates for the loaded MPs. And yes, the Server OS MP was found. This MP comes in three parts:

  • Windows Server 2008 Operating System (Discovery)
  • Windows Server 2008 Operating System (Monitoring)
  • Windows Server Operating System Library

I selected all three parts of this MP and hit the OK > Install buttons. First the MPs were downloaded and then the import started. Oops! Something is not going well here:
image

The first two parts of the Server OS MP did not import. The library part of this MP imported successfully however. I started a second run. And now the two parts of this MP which failed on the first run were neatly shown:
image

I hit the OK > Install buttons again and now all went well:
image

So two runs were needed in order to update the Server OS MP properly.

But why?

In order to get to the bottom of this we need to take a deeper look into the Server OS MP itself and check out the dependencies in this MP.

During the first run the part of the Server OS MP which gets updated first is the Discovery part. Lets take a look at the dependencies of that part of the Server OS MP (double click the MP, go to the third tab Dependencies and check out the first field ‘Management Packs this Management Pack depends on’):
image 
Hmm. It depends on the NEWEST version of the Library part of the Server OS MP. But that isn’t loaded yet…

Lets take a look at the Monitoring part which gets secondly updated during the first run:
image
It also depends on the NEWEST version of the Library part which isn’t loaded yet.

Lets visualize the dependencies a bit more where the blue arrows depict the dependencies:
image 

During the first run the requirements for the first two parts of the Server OS MP aren’t completely met: the required Library part AND the required version of that MP isn’t in place. So the Discovery and Monitoring part will not load.

However during the same first run the Library part is loaded which enables a successful second run of the import of this MP.

Sometimes when updating/importing MPs by using the MP Catalog Web Service the order in which the parts of the MPs are loaded is not entirely correct. So not all the parts of the related MP aren’t loaded on the first run and some errors will be shown. Do not panic, do a second run and you will be just fine.

2 comments:

Unknown said...

Hi!

No need to do this in 2 steps, just add the Library MP first and then the others. Then it works!

Marnix Wolf said...

Hi Snajgel,

Thanks for visiting my blog and thanks for your good comment.

Bye,
Marnix