- ake sure mgmt is stopped (you can leave it on 4.13 if not already downgraded), stop cloudstack-agents on KVM hosts. - Rollback DB with your SQL statements, that you shared a few emails ago (unfortunately after this 4.12 is NOT possible to work normally...) -Download the new systemVM template - it WILL OVERWRITE your old one - i.e.: From mgmt, mount the Secondary Storage NFS on /mnt/secondary and execute:
/usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt -m /mnt/secondary -u http://download.cloudstack.org/systemvm/4.11/systemvmtemplate-4.11.3-kvm.qcow2.bz2 -h kvm -F This will overwrite existing systemVM template on the /mnt/secondary/templates/1/3/xxxxxx and will update the DB with new names etc... - Upgrade packages to 4.13 now (if not already having 4.13 installed) - start mgmt - upgrade path will find the new systemVM template and mgmt server should start fine. - Destroy your SSVM and CPVM, new ones will be recreated from new systemVM template. - Restart all VRs (or restart networks/VPCs with Clean Up option) - new will be created from the new systemVM template. I've just tested all this in my lab - let me know if any issues. On Wed, 2 Oct 2019 at 20:37, Fariborz Navidan <mdvlinqu...@gmail.com> wrote: > I cannot rollback DB to 4.12. How can I download 4.11.3 and and register in > DB? > > On Wed, Oct 2, 2019 at 9:43 PM Andrija Panic <andrija.pa...@gmail.com> > wrote: > > > There's a GitHub issue about this (perhaps you or some colleague?) > > > > Did you register 4.11.3 (not 4.13) systemVM template? Documentation has > > just been updated... Sorry for this. > > > > i..e. downgrade packages to 4.12, make sure your DB is rolled back, start > > 4.12 normally, register 4.11.3 systemVM template as per the doc and then > > try again to upgrade. > > > > let me know how it goes. > > > > Andrija > > > > On Wed, 2 Oct 2019, 17:27 Fariborz Navidan, <mdvlinqu...@gmail.com> > wrote: > > > > > Any idea? > > > > > > On Wed, Oct 2, 2019 at 3:59 PM Fariborz Navidan <mdvlinqu...@gmail.com > > > > > wrote: > > > > > > > Yes, It was clean 4.12 installation. > > > > > > > > On Wed, Oct 2, 2019 at 3:52 PM Andrija Panic < > andrija.pa...@gmail.com> > > > > wrote: > > > > > > > >> "was this a clean 4.12 install, then later upgrade - or was it > > > previously > > > >> 4.11.x then 4.12 etc?" > > > >> > > > >> On Wed, 2 Oct 2019 at 14:20, Fariborz Navidan < > mdvlinqu...@gmail.com> > > > >> wrote: > > > >> > > > >> > Which question? > > > >> > > > > >> > I have sent pastebin link. I lost 4.12 backup accidentally. I am > > > trying > > > >> to > > > >> > make 4.13 upgrade successfully. I do run following commands before > > > >> upgrade > > > >> > retry: > > > >> > > > > >> > [root@fr-kvm1 ~]# cat rollback.sql > > > >> > delete from guest_os_hypervisor where guest_os_id >= 277; > > > >> > delete from guest_os where id >= 277; > > > >> > SET FOREIGN_KEY_CHECKS=0; > > > >> > drop table direct_download_certificate; > > > >> > drop table vpc_offering_details; > > > >> > drop table direct_download_certificate_host_map; > > > >> > drop table template_ovf_properties; > > > >> > SET FOREIGN_KEY_CHECKS=1; > > > >> > alter table data_center drop column sort_key; > > > >> > alter table vpc_offerings drop column sort_key; > > > >> > alter table disk_offering add column domain_id int(32) not null; > > > >> > alter table service_offering_details add constraint > > > >> > uk_service_offering_id_name unique (id); > > > >> > alter table network_offering_details DROP COLUMN `display`; > > > >> > ALTER TABLE `cloud_usage`.`usage_vmsnapshot` DROP COLUMN > > > >> `vm_snapshot_id`; > > > >> > ALTER TABLE `cloud_usage`.`usage_snapshot_on_primary` DROP COLUMN > > > >> > `vm_snapshot_id`; > > > >> > [root@fr-kvm1 ~]# > > > >> > > > > >> > However I don't understand the error I showed you on log in > > pastebin. > > > >> > Please check and let me know what does it mean. > > > >> > > > > >> > On Wed, Oct 2, 2019 at 3:27 PM Andrija Panic < > > andrija.pa...@gmail.com > > > > > > > >> > wrote: > > > >> > > > > >> > > It was not designed to rollback on its own, you are expected to > > > >> rollback > > > >> > DB > > > >> > > yourself (DB restore) and try again if needed. > > > >> > > > > > >> > > But you have not answered my question. > > > >> > > > > > >> > > On Wed, 2 Oct 2019, 13:50 Fariborz Navidan, < > > mdvlinqu...@gmail.com> > > > >> > wrote: > > > >> > > > > > >> > > > In my experience, if DB upgrade fails, it does not fully rolls > > > back > > > >> > > > remaining 4.13's schema upgraded partially and upon next > restart > > > it > > > >> > does > > > >> > > > not check existence of 4.13's table or columns causing SQL > > errors > > > >> > > > complaining about tables or columns already exists. > > > >> > > > > > > >> > > > On Wed, Oct 2, 2019 at 3:14 PM Andrija Panic < > > > >> andrija.pa...@gmail.com> > > > >> > > > wrote: > > > >> > > > > > > >> > > > > was this a clean 4.12 install, then later upgrade - or was > it > > > >> > > previously > > > >> > > > > 4.11.x then 4.12 etc? > > > >> > > > > > > > >> > > > > On Wed, 2 Oct 2019 at 12:21, Fariborz Navidan < > > > >> mdvlinqu...@gmail.com > > > >> > > > > > >> > > > > wrote: > > > >> > > > > > > > >> > > > > > https://pastebin.com/2EFm0jaW > > > >> > > > > > > > > >> > > > > > On Wed, Oct 2, 2019 at 1:19 PM Andrija Panic < > > > >> > > andrija.pa...@gmail.com> > > > >> > > > > > wrote: > > > >> > > > > > > > > >> > > > > > > (backup, backup, backup...) > > > >> > > > > > > > > > >> > > > > > > Can you send the full logs (passtebin or similar please, > > not > > > >> in > > > >> > > > email) > > > >> > > > > ? > > > >> > > > > > > > > > >> > > > > > > Andrija > > > >> > > > > > > > > > >> > > > > > > > > >> > > > > > > > >> > > > > > > > >> > > > > -- > > > >> > > > > > > > >> > > > > Andrija Panić > > > >> > > > > > > > >> > > > > > > >> > > > > > >> > > > > >> > > > >> > > > >> -- > > > >> > > > >> Andrija Panić > > > >> > > > > > > > > > > -- Andrija Panić