1819791 Members
3201 Online
109607 Solutions
New Discussion юеВ

swreg

 
SOLVED
Go to solution
himacs
Super Advisor

swreg

Hi admins,

I have registerd a depot using below command

swreg -l depot /tmp/PHNE_39872.depot

swlist -l depot
it gives correct output as /tmp/PHNE_39872.depot

But when i tried to install on another server
swinstall -s 10.11.10.34:/tmp/PHNE_39872.depot

in SAM window i cannot get source server name in source hostname field.
and please find the attached error

plz suggest on this
himacs
38 REPLIES 38
Tingli
Esteemed Contributor

Re: swreg

In another server, you can use

swlist -l depot @ 10.11.10.34

to see that patch depot is available or not.
himacs
Super Advisor

Re: swreg

Yes Tinqli,

Its available

swlist -l depot @ noortrg
# Initializing...
# Target "noortrg" has the following depot(s):
/tmp/rsp/depot
/var/patch/rsp/depot
/tmp/PHNE_39872.depot


Regards
himacs
Tingli
Esteemed Contributor

Re: swreg

I dunno, it sounds strange. How about using /tmp only as the Source Depot Path?
Mel Burslan
Honored Contributor

Re: swreg

This is not authoritative but as far as I can remember, a depot file is actually not a *real* depot but a collection of files, imitating to be on a tape. And since sw commands do not support remote tape drive access, what you are seeing makes perfect sense.

What you need to do is to copy the contents of this depot file into a directory, say /tmp/mypatches, using swcopy command, then register this directory as a depot with

swreg -l depot /tmp/mypatches

then you should be able to access it from remote systems.

HTH
________________________________
UNIX because I majored in cryptology...
himacs
Super Advisor

Re: swreg

Hi Admins,

Thanx for the replies.

I registered with another path

swreg -l depot /var/patch/PHNE_39872.depot


But the same error persists..

Plz help on this

My server is B.11.23

regards
himacs
Tingli
Esteemed Contributor

Re: swreg

You can try by bouncing swagent.
himacs
Super Advisor

Re: swreg

Hi Tinqli,

Thats already done.Any other possibilities?


regards
himacs
himacs
Super Advisor

Re: swreg

Hi Admin,

I rebounced the swagentd in both the servers.

Again i tried with
swinstall -s noortrg:/var/patch/depot

Only problem is in source hostname source server is not available
If i manually type the server name,ican view the registred depots from source..

Plz find the attachment

regards
himacs
Tingli
Esteemed Contributor

Re: swreg

Does that mean you can install it?
Steven E. Protter
Exalted Contributor

Re: swreg

Shalom,

So set up the ip address in /etc/hosts to support hostname in the local system.

ip address hostname

You can support any format you want this way.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Mel Burslan
Honored Contributor

Re: swreg

Now I see what you mean...

You are looking for the file:

$HOME/.sw/defaults.hosts

if you edit this file, you will see a asection like this:

swinstall.hosts_with_depots = {
server1
server2
server3
}

along with other sections. In order to browse this server by selecting it in the drop-down items, your server name must be in this swinstall.hosts_with_depots section.

HTH
________________________________
UNIX because I majored in cryptology...
Bill Hassell
Honored Contributor

Re: swreg

> swinstall -s 10.11.10.34:/tmp/PHNE_39872.depot

You are missing a very important part of the swinstall command: the list of products to be installed from the depot. Add an escaped * at the end like this:

swinstall -s 10.11.10.34:/tmp/PHNE_39872.depot \*

Now the interactive window won't pop-up with confusing choices.


Bill Hassell, sysadmin
himacs
Super Advisor

Re: swreg

Hi Bill,

I have tried with suggested by u.But enede with error which i have attached..

I used below command..
swinstall -p -s 10.11.10.34:/tmp/PHNE_39872.depot\*

Hi Steven,
Hostname is fine,has all the needed entries.

Hi Mel,

I didnot find any file as u mentioned in target server

$HOME/.sw/defaults.hosts

regards
himacs
Dennis Handly
Acclaimed Contributor

Re: swreg

>Mel: imitating to be on a tape. And since sw commands do not support remote tape drive access, what you are seeing makes perfect sense.

I recently ran into this and mentioned it. You can swreg your tape depot and swlist it but you can't swinstall.

>then register this directory as a depot

No need since swcopy does that.
Mel Burslan
Honored Contributor

Re: swreg

> Hi Mel,

>I didnot find any file as u mentioned in target server

Then you should not see any hosts listed other than the local host name when you highlight the source host and hit enter. If you need another hostname to appear on this list you will need to have this file.

And please pay attention to what I have said before and what Dennis has concurred. .depot files are to be used on the local host, not to be used on a remote host as a remote depot. If you have the depot file, why don't you get the single file copied to this host and do your install ? If this is going to go onto too many hosts, the use swcopy to create a depot on the source server, which you can access from anywhere on your network.
________________________________
UNIX because I majored in cryptology...
Sudeesh
Respected Contributor

Re: swreg

There is no point in doing swreg for a *.depot file. You will be able to use it locally but not from remote systems.

You should swcopy the depot first to a folder and then swreg the folder to do remote installs.


Thanks

Sudeesh
The most predictable thing in life is its unpredictability
Dennis Handly
Acclaimed Contributor

Re: swreg

>Sudeesh: There is no point in doing swreg for a *.depot file.

Right, you can only do swlist, probably not that useful.
Tingli
Esteemed Contributor

Re: swreg

I still think remote installation is possible when the depot can be seen from swlist -l depot. But I don't know why it doesn't work.

How about /tmp? is it a link to somewhere else or just the real directory?
himacs
Super Advisor

Re: swreg

Hi admins,

yes i can copy depot to all the nodes and install locally.

But then whats the use of swreg...?

As sudheesh advised let me do a swcopy before swreg..


regards
himacs
Dennis Handly
Acclaimed Contributor

Re: swreg

>But then what's the use of swreg?

In your case you don't need it. But you can unregister depots. Or if you used mv, cp, or pax/tar/cpio to copy a depot, you would need to register it. Or if the depot is on NFS, you may register it on other machines.

Or if you fall into the SD trap of having N ways to do things and you use swpackage instead of swcopy, you would need to register it.
himacs
Super Advisor

Re: swreg

Hi,

I was trying to unregister melow patch but ended up with error..plz guide

swreg -u depot /var/patch/PHNE_39872.depot
ERROR: A valid registration level is needed for the successful
execution of "swreg"(). The valid levels are: "depot", "root",
"shroot" or "prroot".
ERROR: Command line parsing failed.


regards
himacs
Sudeesh
Respected Contributor

Re: swreg

Correct syntax for un-register is:
swreg -l depot -u

Now let me help you to register a depot the right way:

Assume you have downloaded the patch to depot_server@/tmp/PHNE_39872.depot and you want it to register at /depot/patch/PHNE_39872.

swcopy -x mount_all_filesystems=false -x enforce_dependencies=FALSE /tmp/PHNE_39872.depot \* @/depot/patch/PHNE_39872

verify if swcopy has automatically registered it:

swlist -l depot

If not register it:

swreg -l depot /depot/patch/PHNE_39872

From remote system:

swlist -l depot -s depot_server

swinstall -s depot_server:/depot/patch/PHNE_39872 \*


Hope this helps


Thanks

Sudeesh




The most predictable thing in life is its unpredictability
himacs
Super Advisor

Re: swreg

Hi sudeesh,

The unregistration successful.

I have run swcopy as suggested by you.But ended up with errors.


* Session started for user "root@noortrg".

* Beginning Selection
* "noortrg:/var/patch/PHNE_39872": This target does not exist
and will be created.
ERROR: There is currently no depot software on host "noortrg" at
location "/var/spool/sw". Make sure that an absolute pathname
is specified for location (beginning with "/").
* Source connection failed for "noortrg:/var/spool/sw".
WARNING: More information may be found in the daemon logfile on this
target (default location is noortrg:/var/adm/sw/swagentd.log).
* Selection had errors.
-----------------------
tail -f /var/adm/sw/swagentd.log
16:20:50 uae
* Agent pid=13007 completed. 09/05/09 16:20:50 uae
* Started copy agent on "/var/patch/PHNE_39872" for
root@noortrg, pid=13050, 09/05/09 16:22:54 uae
NOTE: The target "/var/patch/PHNE_39872" does not exist and will be
created. pid=13050 09/05/09 16:22:54 uae
ERROR: Failed to start source agent on "/var/spool/sw" for
root@noortrg. "/var/spool/sw" is not a valid depot. 09/05/09
16:22:54 uae
* Agent pid=13050 completed. 09/05/09 16:22:54 uae

regards
himacs

Sudeesh
Respected Contributor

Re: swreg

sorry .. i missed something(-s): use below syntax

swcopy -x mount_all_filesystems=false -x enforce_dependencies=FALSE -s /tmp/PHNE_39872.depot \* @/depot/patch/PHNE_39872
The most predictable thing in life is its unpredictability