Category Archives: clearcase

FlexLM License Server for ClearCase

With more and more users and applications with licenses, the use of a centralized license server is becoming important.

But what happens if the license server goes down.

With FlexLM it is possible to implement a redundant license server solution.

The configuration is as follows: 

1 Master License Server
2 Redundant License Servers
3 Machines in Different locations
Automatic Failover Implemented by FlexLM

hardwareconfig FlexLM License Server for ClearCase

 

License Server allocation:

  • Master server
  • Secondary server
  • Quorum server, will never be master

Benefits:

  • High Availability
  • No single point of failure
  • Master Server down, Secondary Server takes over as Master and communicates with Quorum server
  • Secondary Server down, Master Server communicates with Quorum server
  • Quorum Server down, no change

In case of 2 servers down, Windows users with a valid license will still be able to work.
License is cached for 3 days or until the license servers come back.

The License File is generated on the IBM Rational Site

All floating licenses are added to one file (default)

In case of other products (Non IBM) the product must be added manually to this license file after generation

Copies of the license file must be on all servers (simple scp command to do this)

Automatic startup (Solaris 10)

  • smf (Service Management Facility) startup
  • All servers start at boot time
  • License available when 2 servers started
  • Dedicated user for all 3 servers created
  • Script for restart of servers from master server

FlexLM service definition in smf is named svc:/network/flexlm:flexlm

Import of the flexlm configuration file

  • svccfg import /opt/rational/config/flexlm.xml

 

cat  /opt/rational/config/flexlm.xml
<?xml version=”1.0″?>
<!DOCTYPE service_bundle SYSTEM “/usr/share/lib/xml/dtd/service_bundle.dtd.1″>

<service_bundle type=’manifest’ name=’LNFflexlm:flexlm’>

<service
        name=’network/flexlm’
        type=’service’
        version=’1′>
        <single_instance />

        <instance name=’flexlm’ enabled=’false’>
                <!–
                  Wait for network interfaces to be initialized.
                –>
                <dependency name=’network’
                    grouping=’require_all’
                    restart_on=’error’
                    type=’service’>
                    <service_fmri value=’svc:/milestone/network:default’/>
                </dependency>

                <!–
                  Wait for all local filesystems to be mounted.
                –>
                <dependency name=’filesystem-local’
                    grouping=’require_all’
                    restart_on=’none’
                    type=’service’>
                    <service_fmri
                        value=’svc:/system/filesystem/local:default’/>
                </dependency>

                <exec_method
                        type=’method’
                        name=’start’
                        exec=’/lib/svc/method/flexlm start’
                        timeout_seconds=’60’>
                        <method_context>
                                <method_credential user=’nobody’ group=’noaccess’/>
                        </method_context>
                </exec_method>
                <exec_method
                        type=’method’
                        name=’stop’
                        exec=’/lib/svc/method/flexlm stop’
                        timeout_seconds=’60’>
                        <method_context>
                                <method_credential user=’nobody’ group=’noaccess’/>
                        </method_context>
                </exec_method>
                <exec_method
                        type=’method’
                        name=’refresh’
                        exec=’/lib/svc/method/flexlm refresh’
                        timeout_seconds=’60’>
                        <method_context>
                                <method_credential user=’nobody’ group=’noaccess’/>
                        </method_context>
                </exec_method>
        </instance>

        <stability value=’Evolving’ />

        <template>
                <common_name>
                        <loctext xml:lang=’C’>
                                FLEXlm License Manager
                        </loctext>
                </common_name>
                <documentation>
                        <doc_link name=’flexlm’
                                uri=’file://@CLIENT_BASEDIR@/share/doc/flexlm/’ />
                </documentation>
        </template>
</service>
</service_bundle>

Moving ClearCase Views

When a view server becomes too small, old or in any other way needs to be replaced it is often the case that users have views, they do not want to loose.

Here is a process to move a view from one server to another.

First we need to find the details of the view:

cleartool lsview -l TheView

Tag: TheView
Global path: /home/storage/views/TestView.vws
Server host: viewserver01
Region: unix
Active: YES
View tag uuid:6f8a1caf.08c411de.8016.00:01:d4:a2:88:10
View on host: viewserver01
View server access path: /home/storage/views/TestView.vws
View uuid: 6f8a1caf.08c411de.8016.00:01:d4:a2:88:10
View owner: viewusers/asbjorn

Making view read only and stopping it.

cleartool chview -readonly TheView

cleartool endview -server TheView

The reformat view is not mandatory, however when moving a view from CC 2003.06 to CC 7 it can come in handy.

cleartool reformatview -dump /home/storage/views/TheView.vws

Remove the references to the view from the registry.

cleartool rmtag -view TheView

cleartool unregister -view -uuid 6f8a1caf.08c411de.8016.00:01:d4:a2:88:10

Now make a tarfile of the view storage, then untar this file on the new server in the desired location.

When the restore have been successful, register the view in the new location

cleartool register -view -host viewserver02 -hpath /home/storage/views/TheView.vws /home/storage/views/TheView.vws
cleartool mktag -view -replace -tag TheView -host `hostname` -gpath /home/storage/views/TheView.vws /home/storage/views/TheView.vws

Again you may not need to do the following step.

cleartool reformatview -load -tag TheView

Start the view, and your view is now on the new server.

cleartool startview TheView