xcp-ng / xcp

Entry point for issues and wiki. Also contains some scripts and sources.
https://xcp-ng.org
1.31k stars 74 forks source link

xcp-ng local iso storage repository not preserved on upgrade #360

Open jebsolutions opened 4 years ago

jebsolutions commented 4 years ago

steps to duplicate:

expected behavior

actual behavior:

work around:

This should be fixed or at least documented to avoid unexpected loss of data.

I saw another bug/discussion (I can't find the link now) where it was noted that in the UI you can add a local storage iso repository...but it didn't actually make the directory (had to make it from shell manually). I also agree that there should be a quick iso upload function as uploading via filezilla is kinda not the friendliest.

Yes, most users should use an iso file share. But by comparison, the Free ESXI lets you upload the iso via the web ui. This is much easier to get you started making your first VM without having to setup a file share somewhere else before you even get started.

stormi commented 4 years ago

Thanks for the report. I'm flagging it as an enhancement request.

hrvoj3e commented 4 years ago

This just happened to me after upgrading via USB from 8.0.0 to 8.1.0. :cry: Before

Also found files in partition 2 : /dev/nvme0n1p2

mount /dev/nvme0n1p2 /mnt/part2/
## found files
ls -la /mnt/part2/srv/iso/
olivierlambert commented 4 years ago

That's "expected" as upgrade via ISO is wiping completely the / folder during the upgrade. That's why local dom0 modification are discouraged in general.

Anyway, you have them in backup partition, but keep that in mind for the next upgrade :)

As @stormi said, it's flagged as enhancement request, and contributions are welcome.

stormi commented 4 years ago

And it's documented in https://xcp-ng.org/docs/upgrade.html#upgrade-via-installation-iso-recommended

hrvoj3e commented 4 years ago

I see it now - still new to this. I just expected the same "linux like behavior". /home, /srv, /var are preserved accross upgrades. Note to myself - RTFM - again.

Docs c/p:

Any additional changes made by you to the system will be lost, so you will have to make them again. Including: changes to /etc, additional users created and their homes, local ISO SRs...

olivierlambert commented 4 years ago

At least, you don't lose your data (backup partition). But yeah, you need to see XCP-ng more as a turnkey appliance than your usual distro.

You are raising a valid question though: what do we chose to keep or not? Because not keeping a lot of stuff is great to get rid of potential modifications that could break stuff. But in the mean time you'd like to keep various settings. Where to draw the line is not an easy question :smile:

nagilum99 commented 4 years ago

Idea: The local ISO repo could at be implemented as GUI function into XOA and store it (hard coded or overwriteable default pathvalue) somewhere, where it's not get lost during an upgrade.

olivierlambert commented 4 years ago

You can already add a local SR ISO via Xen Orchestra, so I'm not sure to get your suggestion?

nagilum99 commented 4 years ago

How could his one get lost? It should have a default path value then, that allows to be migrated by upgrade setups. E.g. /home/local-iso, if you say home is being kept during upgrades.

olivierlambert commented 4 years ago

Because the filesystem isn't "connected" to XAPI settings. XAPI just stores a path toward the ISO SR, the installer doesn't care about anything like that, it just wipes the partition.

Again, it's a decision/line to draw: Citrix policiy is clear. No dom0 modification, so we'll destroy everything outside the "default". We can decide to do otherwise, but we need to select what we add to be kept.