I got an Internal Server Error and received the following error at http://example.com/clouds/openstack/dii_regionone/instance?q=clouds%2Fopenstack%2Fdii_regionone%2Finstance
Could you please check it?
Drupal\Core\Database\DatabaseExceptionWrapper: Exception in OpenStack Instance[openstack_instance]: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'dev2.openstack_instance__network_interfaces' doesn't exist: SELECT t.* FROM {openstack_instance__network_interfaces} t WHERE (entity_id IN (:db_condition_placeholder_0, :db_condition_placeholder_1, :db_condition_placeholder_2, :db_condition_placeholder_3)) AND (deleted = :db_condition_placeholder_4) AND (langcode IN (:db_condition_placeholder_5, :db_condition_placeholder_6, :db_condition_placeholder_7)) ORDER BY delta ASC; Array ( [:db_condition_placeholder_0] => 1 [:db_condition_placeholder_1] => 2 [:db_condition_placeholder_2] => 3 [:db_condition_placeholder_3] => 4 [:db_condition_placeholder_4] => 0 [:db_condition_placeholder_5] => en [:db_condition_placeholder_6] => und [:db_condition_placeholder_7] => zxx ) in Drupal\views\Plugin\views\query\Sql->execute() (line 1543 of /var/www/html/web/core/modules/views/src/Plugin/views/query/Sql.php).
Thank you for the update. The following code is a part of openstack_update_8227 but could you please add ?: [] just in case? That is, foreach ($entities ?: [] as $entity) { because if we search the entire code, it will let us pay attention.
Comments
Comment #2
ishani.addweb commentedComment #3
baldwinlouie commented@ishani, Thank you for this patch. I have the following comments.
Please add a
public static function create(ContainerInterface $container)to pass the openstack.ec2 service to this form.See OpenStackSnapshotCreateForm.php for reference.
Instead of unsetting these form elements, it is better to set ['#access'] = FALSE;
For example:
$form['instance']['instance_type']['#access'] = FALSE;
See this explanation: https://drupal.stackexchange.com/questions/17778/unset-form-elements-wit...
Please use the $ec2Service object that is dependency injected.
Please use the $ec2Service object that is dependency injected.
Comment #4
ishani.addweb commented@baldwinlouie
Please ignore above patch
Thanks.
Comment #5
ishani.addweb commented@baldwinlouie @yas
Done changes as per your above comment.
Interdiff of patch is not provided as having conflicts in file.
Please review new patch.
Thanks.
Comment #6
yas@ishaniaddweb
I got an Internal Server Error and received the following error at
http://example.com/clouds/openstack/dii_regionone/instance?q=clouds%2Fopenstack%2Fdii_regionone%2FinstanceCould you please check it?
Drupal\Core\Database\DatabaseExceptionWrapper: Exception in OpenStack Instance[openstack_instance]: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'dev2.openstack_instance__network_interfaces' doesn't exist: SELECT t.* FROM {openstack_instance__network_interfaces} t WHERE (entity_id IN (:db_condition_placeholder_0, :db_condition_placeholder_1, :db_condition_placeholder_2, :db_condition_placeholder_3)) AND (deleted = :db_condition_placeholder_4) AND (langcode IN (:db_condition_placeholder_5, :db_condition_placeholder_6, :db_condition_placeholder_7)) ORDER BY delta ASC; Array ( [:db_condition_placeholder_0] => 1 [:db_condition_placeholder_1] => 2 [:db_condition_placeholder_2] => 3 [:db_condition_placeholder_3] => 4 [:db_condition_placeholder_4] => 0 [:db_condition_placeholder_5] => en [:db_condition_placeholder_6] => und [:db_condition_placeholder_7] => zxx ) in Drupal\views\Plugin\views\query\Sql->execute() (line 1543 of /var/www/html/web/core/modules/views/src/Plugin/views/query/Sql.php).Comment #7
ishani.addweb commentedComment #8
jigish.addweb commented@yas
I fixed database error as you reported.
Please test new patch.
Thanks
Comment #9
yas@jigishaddweb
All tests have not been passed successfully:
Comment #10
jigish.addweb commented@yas
Thank you for testing the patch.
I fixed AWS testcase errors. Please review new patch.
Thanks
Comment #11
yas@jigishaddweb
Thank you for the update. I tested and I think this is a great patch.
@baldwinlouie
Could you please review the patch just in case?
Comment #12
yasComment #13
baldwinlouie commented@jigish, and @yas, Thank you for the patch. It looks pretty good. I have the following two comments.
Can you please delete the old module/cloud_service_providers/openstack/Entity/Instance "Instance" entity from the database?
Please look at aws_cloud_update_8218() for an example of deleting the 'aws_cloud_vpc_peering_connection' entity.
Can you please add the following three annotations?
Comment #14
jigish.addweb commented@yas @baldwinlouie
Thank you for reviewing the patch.
I changed the code as per above comment.
Please review the new patch.
Thanks
Comment #15
yas@jigishaddweb
Thank you for the update. The following code is a part of openstack_update_8227 but could you please add
?: []just in case? That is,foreach ($entities ?: [] as $entity) {because if we search the entire code, it will let us pay attention.<?php
+++ b/modules/cloud_service_providers/openstack/openstack.install
@@ -601,15 +603,31 @@
* Update openstack_instance view.
*/
function openstack_update_8227() {
...
+ foreach ($entities as $entity) {
Comment #16
jigish.addweb commented@yas
Thank you for review the patch.
I have done the changes as you mentioned in previous comment.
Please review the updated patch again.
Thanks
Comment #17
yas@jigishaddweb
Thank you for the update!
@baldwinlouie
Could you please review the patch?
Comment #18
baldwinlouie commented@yas and @jigish, Thank you for the update. The patch looks good to me now.
Comment #19
yas@baldwinlouie
Thank you for your review. I'll merge the patch to
8.x-1.xand8.x-2.xand close this issue asFixed.Comment #22
yas