On 09/13/10 18:23, mwedel wrote:
> On 09/13/10 12:33 PM, Sue Sohn wrote:
>> There has been a fair amount of confusion stemming from the fact that the
>> filename used to publish a manifest with installadm add-manifest is not
>> the same
>> as the name listed by installadm list or used by installadm
>> delete-manifest and
>> installadm set-criteria. Instead, these subcommands use a name defined
>> by an
>> attribute inside the manifest file (which is then appended with ".xml",
>> if not
>> already present).
>>
>> This issue is documented in:
>> 4322 installadm list should list name of the manifest that was used for
>> creation
>> 12724 installadm list shouldn't append '.xml" to manifest names
>> 6977446 name attribute of 'ai-instance' tag used as manifest filename in
>> AI database
>
> What I would like (and maybe already exists but I missed it) is to be
> able to say what the manifest name on the command line.
>
> What I do now is have a script that reads the manifest and does some
> minimal amount of processing - right now part of that processing is to
> update the manifest name to be something usable. However, since the
> script is doing this and is just make a temp file, the resulted file is
> /tmp/ai_manifest_<pid of process> - that is really useless as a manifest
> also.
>
> The main issue I'm having here is this:
> I let users add custom manifests for clients they are installing, but
> the script that wraps around it uses the -c to set the criteria.
>
> If another person goes and uses that same machine, I want to remove that
> manifest so that the default is used- however, to do so, I need to know
> what it is called.
>
> So my solution right now is to name the manifest ai_<ip_addr> - in that
> way, if I have the hostname, I know the ip address and can see if there
> is a manifest that needs to be removed.
You could continue to use the internal name attribute to do the same thing as
you've been doing (but see below).
> What would be handy here:
>
> 1) Something like 'installadm delete-manifest -n <service> -c
> <criteria>' where that criteria is same as was used for add - in that
> case, I care less what the manifest is called as I can then just put in
> the same criteria as I used when adding it.
Interesting idea.
> 2) Related to that, have installadm list -m have some option to show
> what criteria is used for each manifest - I'm getting around this right
> now by using the ip address in the manifest name. It seems like
> installadm knows this, as if I try to add a new manifest for a system
> that already has one set up, it will generate an error about the conflict.
As Clay mentioned, you can see the criteria for each manifest in a given service
by using the command:
installadm list -m -n <svcname>
> 3) Have an option to add-manifest for it to use that as the manifest
> name instead of pulling it either out of the file name or using the file
> itself.
Actually, one of the things that has always bothered me about installadm is how
add-manifest uses the -m option one way (manifest file) and how delete-manifest
(and now set-criteria) use -m another way (manifest name). We could make things
more consistent by adding a new flag and by changing the usage slightly as
follows:
Current usage:
add-manifest -m <manifest> -n <svcname>
[-c <criteria=value|range> ... | -C <criteria.xml>]
Proposed usage:
add-manifest -f <manifest_file> -n <svcname> [-m <manifest_name>]
[-c <criteria=value|range> ... | -C <criteria.xml>]
The manifest file would now be specified with -f. The -m would be optional and
could be used to specify the manifest name on the command line, if desired. The
precedence order for the name would be:
1) -m option, if present
2) internal name attribute, if present
3) filename
Let me know what you think of this approach.
Thanks,
Sue
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss