FOGProject / fos

FOG Operating System
31 stars 33 forks source link

Rely on bin/fog.upload logic for fixed parts #24

Closed Quazz closed 5 years ago

Quazz commented 5 years ago

In order to avoid having to maintain essentially the same code twice in different locations, rely on the code in bin/fog.upload and simply read out and check against the value (like it already does earlier in the file anyway!)

Sebastian-Roth commented 5 years ago

@Quazz Thanks for the pull request! Took me a little while to see the link between this and the code in fog.upload (ref). Good point. Still not sure why we have this kind of double checked.

But I'd suggest to go ahead and do a proper cleanup of this. As you said, $is_fixed is being checked in line 439 already. So why check if again further down again? I'd say just get rid of the whole lot (line 462 to 473). What do you think??

Mind pushing that change and I'll merge it in?!

Quazz commented 5 years ago

Do you mean to move up the adding of the part numbers into $imagePath/d1.fixed_size_partitions up into the initial test for is_fixed?

edit: Pushed an update

Sebastian-Roth commented 5 years ago

@Quazz Sorry for the delay, have been on the road. Yeah, pretty much exactly like that. I'll merge this now and we see if that can fix the issue for the user in the forums: https://forums.fogproject.org/topic/13118/no-shrink-from-v1-5-5-until-v1-6-deploy-error-100-cpu-load-in-node-1-5-2