[pve-devel] applied: [PATCH installer] abort installation if memory is less than 1GB

Oguz Bektas o.bektas at proxmox.com
Wed Jul 3 11:50:53 CEST 2019


hi,

On Wed, Jul 03, 2019 at 10:22:06AM +0200, Thomas Lamprecht wrote:
> On 7/2/19 3:17 PM, Oguz Bektas wrote:
> > show a message on screen about memory requirement, then die and abort
> > the installation.
> > 
> > Signed-off-by: Oguz Bektas <o.bektas at proxmox.com>
> > ---
> >  proxinstall | 5 +++++
> >  1 file changed, 5 insertions(+)
> > 
> > diff --git a/proxinstall b/proxinstall
> > index e6a29b3..f8dd1d6 100755
> > --- a/proxinstall
> > +++ b/proxinstall
> > @@ -3234,6 +3234,11 @@ sub create_intro_view {
> >  
> >      cleanup_view();
> >  
> > +    if (int($total_memory/1024) < 1) {
> 
> not that it matters much but:
> > int($total_memory) < 1024
> is:
> * easier to read
> * most of the time faster, (simple compare vs division + compare,
makes sense, alright.
> 
> > +	display_error("you need at least 1GB memory to install Proxmox\n");
> > +	die "not enough memory";
> 
> I do not want to die here, if one wants to continue, why not (e.g.,
> the limit is not exactly 1024 but rather somewhere beteween 850-900
> MB, and also then the error is IMO not reasonable, proxinstall +
> gtk-webkit + base system need ~ 300 MB memory, and that the page
> cache flushes result in memory almost OOM-like errors seems wrong.)
> 
> I mean, the check is still OK, as this is our min. system requirement,
> and it does normally not make sense to install PVE/PMG to anything with
> less memory, besides from testing :)
the reason i added the die is, it'll fail at the last step during
unsquashfs if there's not enough memory (gets oom killed). this is kind
of annoying and you end up with an unbootable system on top, so it's a
waste of time. why wouldn't we prevent that?
> 
> With followups minding above: applied
> 
> > +    }
> > +
> >      if ($setup->{product} eq 'pve') {
> >  	eval {
> >  	    my $cpuinfo = file_get_contents('/proc/cpuinfo');
> > 
> 




More information about the pve-devel mailing list