isPrimary Rest request is not showing correctly when Primary is down
search cancel

isPrimary Rest request is not showing correctly when Primary is down

book

Article ID: 246503

calendar_today

Updated On:

Products

CA Spectrum

Issue/Introduction

We have a SpectroSERVER fault tolerance setup with OneClick servers running on both SpectroSERVERs.

We use a rest request that we have added into our SANM scripts in order to identify which server is acting as the primary SpectroSERVER.

Example of REST Request

http://<OneClick Server>:<port>/spectrum/restful/landscapes

 

This was working fine until we have upgraded 

 

When both Primary and Secondary are up and active both are showing isPrimary as true.

This is the expected behavior because any OneClick server will always connect to the Primary SS and it does not matter which server it is located on.

However in my case what is unexpected, is when I shutdown the Primary SS and the backup SS takes over, I still see the landscape list showing 

http://hostname/spectrum/restful/landscapes  (Primary SS when SS is shutdown)

<landscape-response xmlns="http://www.ca.com/spectrum/restful/schema/response" total-landscapes="1">
<landscape>
<id>0x2000000</id>
<name>hostname</name>
<isPrimary>true</isPrimary>
<spectrumVersion>23.3.6.000</spectrumVersion>
</landscape>
</landscape-response>
 
 
http://hostname.net/spectrum/restful/landscapes  (OC Server running on backup SS when Primary is shutdown).
 
<landscape-responsexmlns="http://www.ca.com/spectrum/restful/schema/response"total-landscapes="1">
<landscape>
<id>0x2000000</id>
<name>hostname</name>
<isPrimary>true</isPrimary>
<spectrumVersion>23.3.6.000</spectrumVersion>
</landscape>
</landscape-response>
 
 
The expected behavior at least on the Primary would be the same as what I saw on my server before upgrade
 
<landscape-responsexmlns="http://www.ca.com/spectrum/restful/schema/response"total-landscapes="1">
<landscape>
<id>0x2000000</id>
<name>hostname</name>
<isPrimary>false</isPrimary>
<spectrumVersion>22.2.5.001</spectrumVersion>
</landscape>
</landscape-response>
 
I do not see that here on 23.3.6 with Primary SpectroSERVER down.

Environment

Release : 22.x / 23.x

Component : Spectrum OneClick REST

Cause

Issue with the SSdb after upgrade requires a database reload from the primary to the secondary.

Resolution

We needed to save and reload the SSdb from the primary to the secondary and then restart tomcat and all should work correctly.

 

1. Stop the Primary SS and save the SSdb

2. Copy the SSdb over to the Secondary SS

3. Start the Primary SS and wait for it to come back online

4. Stop the Secondary SS and reload the saved SSdb from Step 1 from $SPECROOT

../SS-Tools/SSdbload -il -a 20 <path to SSdb>/<name of SSdb>

5. Once the SSdb on Secondary has been loaded, restart the tomcat process on Secondary SpectroSERVER.

6. Test again by bringing down the Primary and running the query

 

Additional Information

Restful Landscape documentation

 

Doc Link