Hi Wei, I checked the previous backups and i could fin the procedures in de previous backup
cloud-backup_2022-06-18-234540:/*!50003 DROP PROCEDURE IF EXISTS `ADD_GUEST_OS_AND_HYPERVISOR_MAPPING` */; cloud-backup_2022-06-18-234540:CREATE DEFINER=`cloud`@`localhost` PROCEDURE `ADD_GUEST_OS_AND_HYPERVISOR_MAPPING`( IN guest_os_category_id bigint(20) unsigned, IN guest_os_display_name VARCHAR(255), IN guest_os_hypervisor_hypervisor_type VARCHAR(32), IN guest_os_hypervisor_hypervisor_version VARCHAR(32), IN guest_os_hypervisor_guest_os_name VARCHAR(255) ) Not sure when the procedures disappeared, can't find any command in the .mysql_history file that could explain this. Thanks for the help! Kind Regards, Bram > On 31 Mar 2023, at 19:20, Wei ZHOU <[email protected]> wrote: > > Hi Bram. > > The procedure is created in both 4.15.2 to 4.16.0 and 4.16.1 to 4.17.0 > upgrade. > > You have successfully upgraded to 4.16.0.0 and 4.17.0.0 before. The > procedures might be removed manually or due to mysql issues. > > -Wei > > > > On Thursday, 30 March 2023, Bram Gillemon <[email protected]> wrote: > >> root@cs-man-1:~# echo "select * from version" | mysql cloud >> id version updated step >> 1 4.0.0 2021-12-31 08:13:28 Complete >> 2 4.1.0 2021-12-31 07:14:26 Complete >> 3 4.2.0 2021-12-31 07:14:35 Complete >> 4 4.2.1 2021-12-31 07:14:35 Complete >> 5 4.3.0 2021-12-31 07:14:41 Complete >> 6 4.4.0 2021-12-31 07:14:46 Complete >> 7 4.4.1 2021-12-31 07:14:46 Complete >> 8 4.4.2 2021-12-31 07:14:46 Complete >> 9 4.5.0 2021-12-31 07:14:52 Complete >> 10 4.4.4 2021-12-31 07:14:52 Complete >> 11 4.5.1 2021-12-31 07:14:52 Complete >> 12 4.5.2 2021-12-31 07:14:52 Complete >> 13 4.5.3 2021-12-31 07:14:52 Complete >> 14 4.6.0 2021-12-31 07:14:53 Complete >> 15 4.6.1 2021-12-31 07:14:53 Complete >> 16 4.7.0 2021-12-31 07:14:53 Complete >> 17 4.7.1 2021-12-31 07:14:54 Complete >> 18 4.8.0 2021-12-31 07:14:54 Complete >> 19 4.8.1 2021-12-31 07:14:54 Complete >> 20 4.9.0 2021-12-31 07:14:57 Complete >> 21 4.9.1.0 2021-12-31 07:14:57 Complete >> 22 4.9.2.0 2021-12-31 07:14:58 Complete >> 23 4.9.3.0 2021-12-31 07:14:58 Complete >> 24 4.10.0.0 2021-12-31 07:14:59 Complete >> 25 4.11.0.0 2021-12-31 07:15:00 Complete >> 26 4.11.1.0 2021-12-31 07:15:00 Complete >> 27 4.11.2.0 2021-12-31 07:15:00 Complete >> 28 4.11.3.0 2021-12-31 07:15:00 Complete >> 29 4.12.0.0 2021-12-31 07:15:02 Complete >> 30 4.13.0.0 2021-12-31 07:15:03 Complete >> 31 4.13.1.0 2021-12-31 07:15:03 Complete >> 32 4.14.0.0 2021-12-31 07:15:04 Complete >> 33 4.15.0.0 2021-12-31 07:15:06 Complete >> 34 4.15.1.0 2021-12-31 07:15:06 Complete >> 35 4.15.2.0 2021-12-31 07:15:06 Complete >> 36 4.16.0.0 2021-12-31 07:15:08 Complete >> 37 4.16.1.0 2022-03-24 10:43:03 Complete >> 38 4.17.0.0 2022-06-18 21:51:47 Complete >> 39 4.17.1.0 2023-03-30 09:18:29 Complete >> 40 4.17.2.0 2023-03-30 09:18:29 Complete >> 41 4.18.0.0 2023-03-30 09:18:40 Complete >> >> >> >> Kind Regards, >> Bram >> >>> On 30 Mar 2023, at 11:56, Wei ZHOU <[email protected]> wrote: >>> >>> Hi Bram, >>> >>> Good to know it is fixed. >>> >>> Regarding the issue with missing procedures in 4.17.0.0, can you share >> the >>> "version" table in your database ? >>> >>> >>> Kind regards, >>> Wei >>> >>> >>> >>> On Thu, 30 Mar 2023 at 11:29, Bram Gillemon <[email protected]> wrote: >>> >>>> Hi Wei, >>>> >>>> Thanks for the pointer! i had a duplicate db.cloud.encryption.type >> value. >>>> >>>> Everything is working again. >>>> >>>> Kr, >>>> Bram >>>> >>>>> On 30 Mar 2023, at 10:54, Wei ZHOU <[email protected]> wrote: >>>>> >>>>> Hi Bram, >>>>> >>>>> Can you check the setting of "db.cloud.encryption.type" >>>>> in /etc/cloudstack/management/db.properties ? >>>>> >>>>> -Wei >>>>> >>>>> On Thu, 30 Mar 2023 at 10:31, Bram Gillemon <[email protected]> wrote: >>>>> >>>>>> To recap: >>>>>> >>>>>> First time i upgraded cloudstack, got a lot of errors on missing >>>>>> procedures (they just don't exist on my installation, not sure why). >>>>>> >>>>>> Second upgrade: >>>>>> >>>>>> - dropped the cloud database, dropped the cloud_usage database >>>>>> - reimported the cloud database and the cloud_usage database >>>>>> - created the procedures (if i don't, i can't even upgrade cloudstack) >>>>>> - restarted cloudstack-management which completed the upgrade without >>>> any >>>>>> problems? >>>>>> >>>>>> If i then try to connect to the cloudstack mgmt interface i get an >>>>>> >>>>>> HTTP ERROR 503 Service Unavailable >>>>>> >>>>>> URI: /client/ >>>>>> STATUS: 503 >>>>>> MESSAGE: Service Unavailable >>>>>> SERVLET: - >>>>>> >>>>>> >>>>>> Kr, >>>>>> Bram >>>>>> >>>>>> >>>>>>> On 30 Mar 2023, at 10:23, Bram Gillemon <[email protected]> wrote: >>>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> that was my second attempt, you'll see that the second upgrade ran >>>>>> without any issues. >>>>>>> I dropped the database, reimported them and than restarted >>>>>> cloudstack-management and cloudstack-usage. The second upgrade ran >>>> without >>>>>> any problems. >>>>>>> >>>>>>> >>>>>>> Met vriendelijke groeten, >>>>>>> Bram Gillemon >>>>>>> >>>>>>> Voor technische vragen kan je terecht op [email protected] >>>>>>> >>>>>>> -- >>>>>>> >>>>>>> [email protected] >>>>>>> https://www.x-plose.be >>>>>>> t. +32 (0)50 89 26 10 >>>>>>> BTW BE0675.723.477 >>>>>>> >>>>>>> X-plose BV >>>>>>> Lieven Bauwensstraat 16 >>>>>>> 8200 Brugge >>>>>>> Belgiƫ >>>>>>> >>>>>>> Dit emailbericht is strikt vertrouwelijk. Indien het een verkeerde >>>>>> bestemmeling zou bereiken, verzoeken wij u ons daarvan onmiddellijk te >>>>>> verwittigen door ons het bericht terug te sturen via reply. Gelieve >> het >>>>>> bericht daarna te wissen en dit niet te lezen of kenbaar te maken aan >>>>>> derden. Klik hier om het privacybeleid van de onderneming te vinden. >>>>>>> >>>>>>>> On 30 Mar 2023, at 10:21, Wei ZHOU <[email protected]> wrote: >>>>>>>> >>>>>>>> Hi Bram, >>>>>>>> >>>>>>>> If the upgrade fails, you need to restore the database from backup. >>>>>>>> Otherwise, you will face the issue like >>>>>>>> Caused by: java.sql.SQLSyntaxErrorException: Duplicate column name >>>>>>>> 'public_mtu' >>>>>>>> >>>>>>>> Please try the following (assume you have backed up the database >>>> before >>>>>>>> upgrade) >>>>>>>> - stop cloudstack-management >>>>>>>> - drop old databases cloud and cloud_usage >>>>>>>> - restore databases >>>>>>>> - create the missing procedures >>>>>>>> - start cloudstack-management >>>>>>>> >>>>>>>> >>>>>>>> -Wei >>>>>>>> >>>>>>>> On Thu, 30 Mar 2023 at 09:40, Bram Gillemon <[email protected]> >> wrote: >>>>>>>> >>>>>>>>> Hi, >>>>>>>>> >>>>>>>>> so i restarted the upgrade procedure from the previous database. >>>>>>>>> >>>>>>>>> the only 2 things missing in the database to upgrade without any >>>> issues >>>>>>>>> where these procedures: >>>>>>>>> >>>>>>>>> CREATE PROCEDURE `cloud`.`ADD_GUEST_OS_AND_HYPERVISOR_MAPPING` ( >>>>>>>>> IN guest_os_category_id bigint(20) unsigned, >>>>>>>>> IN guest_os_display_name VARCHAR(255), >>>>>>>>> IN guest_os_hypervisor_hypervisor_type VARCHAR(32), >>>>>>>>> IN guest_os_hypervisor_hypervisor_version VARCHAR(32), >>>>>>>>> IN guest_os_hypervisor_guest_os_name VARCHAR(255) >>>>>>>>> ) >>>>>>>>> BEGIN >>>>>>>>> INSERT INTO cloud.guest_os (uuid, category_id, display_name, >>>> created) >>>>>>>>> SELECT UUID(), guest_os_category_id, guest_os_display_name, now() >>>>>>>>> FROM DUAL >>>>>>>>> WHERE not exists( SELECT 1 >>>>>>>>> FROM cloud.guest_os >>>>>>>>> WHERE cloud.guest_os.category_id = >>>>>>>>> guest_os_category_id >>>>>>>>> AND cloud.guest_os.display_name = >>>>>>>>> guest_os_display_name) >>>>>>>>> >>>>>>>>> ; INSERT INTO cloud.guest_os_hypervisor (uuid, >>>> hypervisor_type, >>>>>>>>> hypervisor_version, guest_os_name, guest_os_id, created) >>>>>>>>> SELECT UUID(), guest_os_hypervisor_hypervisor_type, >>>>>>>>> guest_os_hypervisor_hypervisor_version, >>>>>> guest_os_hypervisor_guest_os_name, >>>>>>>>> guest_os.id, now() >>>>>>>>> FROM cloud.guest_os >>>>>>>>> WHERE guest_os.category_id = guest_os_category_id >>>>>>>>> AND guest_os.display_name = guest_os_display_name >>>>>>>>> AND NOT EXISTS (SELECT 1 >>>>>>>>> FROM cloud.guest_os_hypervisor as >>>> hypervisor >>>>>>>>> WHERE hypervisor_type = >>>>>>>>> guest_os_hypervisor_hypervisor_type >>>>>>>>> AND hypervisor_version = >>>>>>>>> guest_os_hypervisor_hypervisor_version >>>>>>>>> AND hypervisor.guest_os_id = >>>> guest_os.id >>>>>>>>> AND hypervisor.guest_os_name = >>>>>>>>> guest_os_hypervisor_guest_os_name) >>>>>>>>> ;END; >>>>>>>>> >>>>>>>>> CREATE PROCEDURE `cloud`.`IDEMPOTENT_ADD_COLUMN` ( >>>>>>>>> IN in_table_name VARCHAR(200) >>>>>>>>> , IN in_column_name VARCHAR(200) >>>>>>>>> , IN in_column_definition VARCHAR(1000) >>>>>>>>> ) >>>>>>>>> BEGIN >>>>>>>>> DECLARE CONTINUE HANDLER FOR 1060 BEGIN END; SET @ddl = >>>> CONCAT('ALTER >>>>>>>>> TABLE ', in_table_name); SET @ddl = CONCAT(@ddl, ' ', 'ADD >> COLUMN') ; >>>>>> SET >>>>>>>>> @ddl = CONCAT(@ddl, ' ', in_column_name); SET @ddl = CONCAT(@ddl, ' >>>> ', >>>>>>>>> in_column_definition); PREPARE stmt FROM @ddl; EXECUTE stmt; >>>> DEALLOCATE >>>>>>>>> PREPARE stmt; END; >>>>>>>>> >>>>>>>>> >>>>>>>>> After i ran these manually the upgrade went smooth, but i still >> can't >>>>>>>>> reach the mgmt platform. >>>>>>>>> >>>>>>>>> I uploaded the log files, this is the first attempt of the update. >>>>>>>>> >>>>>>>>> https://upload.bugoff.be//first-attempt-management-server.log >>>>>>>>> >>>>>>>>> this is the second attempt where i only added the stored procedures >>>> and >>>>>>>>> ran the upgrade. >>>>>>>>> >>>>>>>>> https://upload.bugoff.be//second-attempt-management-server.log >>>>>>>>> >>>>>>>>> >>>>>>>>> Kind Regards, >>>>>>>>> Bram Gillemon >>>>>>>>> >>>>>>>>>> On 30 Mar 2023, at 09:15, Wei ZHOU <[email protected]> wrote: >>>>>>>>>> >>>>>>>>>> There might be something wrong during the upgrade, for example SQL >>>>>>>>> errors. >>>>>>>>>> >>>>>>>>>> Could you upload the full log ? >>>>>>>>>> >>>>>>>>>> -Wei >>>>>>>>>> >>>>>>>>>> On Wed, 29 Mar 2023 at 23:06, Bram Gillemon <[email protected]> >>>> wrote: >>>>>>>>>> >>>>>>>>>>> Hi, >>>>>>>>>>> >>>>>>>>>>> i'm having some problems updating met cloudstack setup, after the >>>>>> update >>>>>>>>>>> of the cloudstack-management i tried to start it and got some >>>> errors >>>>>> on >>>>>>>>>>> missing procedures, >>>>>>>>>>> >>>>>>>>>>> After creating the necessary procedures by hand, and removing >> some >>>>>> mtu >>>>>>>>>>> fields, cloudstack started, at least i thought. >>>>>>>>>>> >>>>>>>>>>> It's not listening on port 8250, and i can't seem to figure out >>>> why. >>>>>>>>>>> >>>>>>>>>>> the logs mention it's listening, but ss -tpln doesn't show >> anything >>>>>>>>>>> listening on the port. >>>>>>>>>>> >>>>>>>>>>> Attached is the management-server.log, the only "error" i see is >>>> the >>>>>>>>>>> commands.properties is missing. >>>>>>>>>>> >>>>>>>>>>> I couldn't find any troubleshooting tips on to debug this, so i >>>> hope >>>>>>>>>>> somebody has some tips. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Kind Regards, >>>>>>>>>>> Bram >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>> >>>>>> >>>>>> >>>> >>>> >> >>
