Thank you for the update. I tested the patch; and I would like to ask you to change the columns to sortable ones
I encountered the following error while executing drush updb since I have unreachable K8s cluster.
$ drush updb -y
[success] Cache rebuild complete.
-------- ----------- --------------- ---------------------------------------
Module Update ID Type Description
-------- ----------- --------------- ---------------------------------------
k8s 8256 hook_update_n Add fields to k8s_persistent_volume.
-------- ----------- --------------- ---------------------------------------
// Do you wish to run the specified pending updates?: yes.
> [notice] Update started: k8s_update_8256
> [notice] Update completed: k8s_update_8256
> [error] Message: An error occurred when calling K8s API: GET /persistentvolumes
>
> [error] Message: Status Code: 401
>
> [error] Message: Error reason: Unauthorized
>
> [error] Message: Message: Unauthorized
>
[success] Finished performing updates.
[success] Cache rebuild complete.
I assume the error was caused by the following code.
diff --git a/modules/cloud_service_providers/k8s/k8s.install b/modules/cloud_service_providers/k8s/k8s.install
index ec8dd116..bf9e31f4 100644
--- a/modules/cloud_service_providers/k8s/k8s.install
+++ b/modules/cloud_service_providers/k8s/k8s.install
@@ -1177,6 +1177,67 @@ function k8s_update_8255() {
+ foreach ($config_entities as $config_entity) {
+ $k8s_service->setCloudContext($config_entity->getCloudContext());
+ $k8s_service->updateVolumeWithoutBatch();
+ }
Looks we need to validate the K8s cluster connection before start to run $k8s_service->updateVolumeWithoutBatch(); . You can call $k8s_service->getNamespaces(); w/ try-catch clause.
Comments
Comment #2
jigish.addweb commentedComment #3
xiaohua guan commented@jigish.addweb
Thanks for your patch. I found some problems below.
1. The claim_ref should be reason.
2. It seems that some codes weren't included into the patch.
For example, I can't find where the variable $claim is declared.
Comment #4
jigish.addweb commentedComment #5
jigish.addweb commented@guan
Thank you for reviewing the patch. I updated the code.
Please review the patch
Comment #6
jigish.addweb commentedComment #7
xiaohua guan commented@jigishi.addweb
The patch file looks good. Thanks.
Comment #8
yas@jigishaddweb
Thank you for the update. I tested the patch; and I would like to ask you to change the columns to sortable ones
I encountered the following error while executing
drush updbsince I have unreachable K8s cluster.I assume the error was caused by the following code.
Looks we need to validate the K8s cluster connection before start to run
$k8s_service->updateVolumeWithoutBatch();. You can call$k8s_service->getNamespaces();w/try-catchclause.Comment #9
yasComment #10
jigish.addweb commentedComment #11
yas@jigishaddweb
Thank you for the update. I tested it and looks good to me. I'll merge the patch to
8.x-1.xand8.x-2.xand close this issue asFixed.Comment #14
yas