Hi Jeffrey,
thank you very much for putting these set of test cases together !
In order to reflect comments received during code review,
the implementation was slightly modified - the main changes
can be summarized as following (Bug reports will be updated
appropriately):
[1] boot disk specification
Originally, new boolean tag <target_device_select_boot_disk>
was introduced.
This changed (for purposes of [2]) and boot disk will be
specified by setting exiting tag <target_device_name>
to meta keyword 'boot_disk' - the appropriate portion
of AI manifest will then look like:
<ai_target_device>
<target_device_name>
boot_disk
</target_device_name>
</ai_target_device>
[2] Changing the AI manifest schema to enforce the policy
that only allowed combinations of disk criteria can
be specified
Disk criteria will be divided into two mutually exclusive
groups:
G1 - deterministic disk criteria
--------------------------------
* iscsi_target_parameters
* target_device_name (c#t#d# name or 'boot_disk')
* target_device_select_volume_name
* target_device_select_id
* target_device_select_device_path
G2 - rest of disk criteria
--------------------------
* target_device_type
* target_device_vendor
* target_device_size
AI manifest schema will enforce following policy:
* criteria in group G1 are mutually exclusive - only
one can be specified at a time
* groups G1 and G2 are mutually exclusive - i.e.
if criteria from G1 is specified, no criteria
from G2 are allowed and vice versa
* multiple criteria from G2 can be specified at once
If that rules are not obeyed, syntactic validation will
fail (either on AI server when AI manifest is added
by means of 'installadm add' command or on AI client
with following message present in /tmp/install_log file:
<AI Dec 15 16:10:49> Auto install failed. Invalid manifest
/tmp/ai_combined_manifest.xml specified
Comparing with original behavior, it means that
there will be no messages about ignored disk criteria
in /tmp/install_log file.
Looking at the test cases, these changes don't change them
significantly, please see my comments in line for affected ones.
Those not mentioned are considered as valid ones.
Thanks a lot !
Jan
Jeffrey Huang wrote:
> Hi, Jan,
>
> Following is the list of test cases that we are going to add for
> manifest bug fixes,
> please take a look if you have time, and see if needs add more.
>
> ===== New test cases ======
>
> ASSERTION: target_01
> # DESCRIPTION:
> # Using boot disk as target disk for installation, ignore disk
> # selection criteria by disk name c#t#d#
Since either 'boot_disk' or c#t#d# name can be specified
at once (not both as they share the same tag), this test
case can be simplified just to test 'boot disk' scenario.
[...]
>
>
> ASSERTION: target_03
> # DESCRIPTION:
> # Using an invalid volume name as target disk for installation
>
> ASSERTION: target_04
> # DESCRIPTION:
> # Using a volume name with string length longer than 8
Just for reference, the result for target_04 should be
the same as for target_03.
[...]
>
>
> ====== Following cases will be modifeid ========
>
> # ASSERTION: tc_root_device_01
> #
> # DESCRIPTION:
> # AI Manifest with target disk name c#t#d#
> - Add volume name selection criteria alogin with disk name c#t#d#
> criteria,
> and verify the other criteria is ignored
> - Verify disk name c#d#t# has higher priority than volume name
According to new behavior, this will fail during syntactic
validation with following message in /tmp/install_log:
<AI Dec 15 16:10:49> Auto install failed. Invalid manifest
/tmp/ai_combined_manifest.xml specified
>
> # ASSERTION: tc_root_device_03
> #
> # DESCRIPTION:
> # AI Manifest with a target disk defined in terms of other
> parameters, and
> # client has no disk meet the requirements, AI install should fail
> - Verify message or notification of target disk can not be found is
> displayed
> - Verify the installation is aborted
>
I might recommend to add one more additional test for failure
* specify one criterion from group G1
* specify some combination of criteria from G2
Syntactic validation should fail as for tc_root_device_01