IDISK_PROVIDER was included in python's IDISK_PARAMS, so it
should also be included in the Haskell code.

Now that luxid creates and enqueues jobs, without this patch the
ExtStorage interface is broken as the user can not pass the disk
provider to instance related commands.

Signed-off-by: Ilias Tsitsimpis <[email protected]>
---

Hello team,

After the changes made in 2.11 wrt luxid, the ExtStorage
interface broke and the above patch fixes the 'provider' problem.

Fixing the above, I also saw that commit 2ca1b52d7 adds 'spindles' to
the IDiskParams Haskell type. As far as I know until now, spindles
were not handled separately (as happend with 'Vg' and 'MetaVg') and
they were treated like all other diskparams. If this is true, they
should be inherited from the nodegroups/cluster diskparams and thus
not be included in the IDiskParams datatype. Spindles were not part of
the IDISK_PARAMS constant either, if I remember correctly.

Kind Regards,
Ilias


 src/Ganeti/OpParams.hs         | 1 +
 test/hs/Test/Ganeti/OpCodes.hs | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/Ganeti/OpParams.hs b/src/Ganeti/OpParams.hs
index 75403c0..11d62f6 100644
--- a/src/Ganeti/OpParams.hs
+++ b/src/Ganeti/OpParams.hs
@@ -355,6 +355,7 @@ $(buildObject "IDiskParams" "idisk"
   , optionalField $ simpleField C.idiskVg     [t| NonEmptyString |]
   , optionalField $ simpleField C.idiskMetavg [t| NonEmptyString |]
   , optionalField $ simpleField C.idiskName   [t| NonEmptyString |]
+  , optionalField $ simpleField C.idiskProvider [t| NonEmptyString |]
   , optionalField $ simpleField C.idiskSpindles [t| Int          |]
   ])
 
diff --git a/test/hs/Test/Ganeti/OpCodes.hs b/test/hs/Test/Ganeti/OpCodes.hs
index 228ece9..5157801 100644
--- a/test/hs/Test/Ganeti/OpCodes.hs
+++ b/test/hs/Test/Ganeti/OpCodes.hs
@@ -95,7 +95,7 @@ instance Arbitrary IDiskParams where
   arbitrary = IDiskParams <$> arbitrary <*> arbitrary <*>
               genMaybe genNameNE <*> genMaybe genNameNE <*>
               genMaybe genNameNE <*> genMaybe genNameNE <*>
-              arbitrary
+              genMaybe genNameNE <*> arbitrary
 
 instance Arbitrary RecreateDisksInfo where
   arbitrary = oneof [ pure RecreateDisksAll
-- 
1.8.5.2

Attachment: signature.asc
Description: Digital signature

Reply via email to