[SOLVED] Storage error/warning when setting values on a container

loneboat

Member
Jan 17, 2019
36
2
13
32
I have a container which shows the follow error when I try to set values via the terminal:

Code:
root@my-host-name:~# pct set 132 -protection 0
storage does not support content type 'none'

I have tested with other values (such as "-unprivileged") and I receive the same error. Note that the set function actually does succeed, it's just a bit unnerving and I'd like to find out why if possible.

I found this message in the PVE codebase here: https://git.proxmox.com/?p=pve-stor...3a5027a83b569b9259a;hb=refs/heads/master#l262

Code:
sub decode_value {
 my ($class, $type, $key, $value) = @_;

 my $def = $defaultData->{plugindata}->{$type};

 if ($key eq 'content') {
     my $valid_content = $def->{content}->[0];

     my $res = {};

     foreach my $c (PVE::Tools::split_list($value)) {
         if (!$valid_content->{$c}) {
             warn "storage does not support content type '$c'\n";
             next;
         }
         $res->{$c} = 1;
     }

     if ($res->{none} && scalar (keys %$res) > 1) {
         die "unable to combine 'none' with other content types\n";
     }

     return $res;
 } elsif ($key eq 'format') {
     my $valid_formats = $def->{format}->[0];

     if (!$valid_formats->{$value}) {
         warn "storage does not support format '$value'\n";
         next;
     }

     return $value;
 } elsif ($key eq 'nodes') {
     my $res = {};

     foreach my $node (PVE::Tools::split_list($value)) {
         if (PVE::JSONSchema::pve_verify_node_name($node)) {
             $res->{$node} = 1;
         }
     }

     # fixme:
     # no node restrictions for local storage
     #if ($storeid && $storeid eq 'local' && scalar(keys(%$res))) {
     #    die "storage '$storeid' does not allow node restrictions\n";
     #}

     return $res;
 }

... however I'm a bit stumped at this point, and my knowledge of how Proxmox works is very minimal, so I'm having a hard time tracking down what is going on.

Here is the .conf file for the container I'm looking at:


Code:
root@my-host-name:~# cat /etc/pve/nodes/my-host-name/lxc/132.conf
arch: amd64
cores: 8
hostname: test-host-name
memory: 1024
net0: name=eth0,bridge=vmbr1,firewall=1,hwaddr=<SOME MAC ADDRESS>,ip=dhcp,type=veth
ostype: debian
protection: 0
rootfs: local-zfs:subvol-132-disk-0,size=16G
swap: 1024
unprivileged: 1

Any ideas what is triggering this message?
 

loneboat

Member
Jan 17, 2019
36
2
13
32
Oh, I should also note that this container has been cloned from a template. However it's an unlinked clone, so it's not sharing any storage or anything with the parent node it was cloned from.
 

loneboat

Member
Jan 17, 2019
36
2
13
32
Code:
dir: local
        path /var/lib/vz
        content iso,backup,vztmpl

zfspool: local-zfs
        pool rpool/data
        content rootdir,images
        nodes proxmox-a,proxmox-b
        sparse 1

zfspool: tank
        pool tank
        content rootdir,images
        nodes proxmox-a

zfspool: tank-proxmox-isos
        pool tank/proxmox/isos
        content none
        nodes proxmox-a

cifs: proxmox_backups
        path /mnt/pve/proxmox_backups
        server backups.local
        share proxmox_backups
        content backup
        maxfiles 14
        username proxmox

dir: local-dir
        path /local-dir
        content images,rootdir
        nodes proxmox-c
        shared 0

Hmmm, does it have something to do with the content none in the zfspool: tank-proxmox-isos?
 

loneboat

Member
Jan 17, 2019
36
2
13
32
Please post your '/etc/pve/storage.cfg'

Aha! It was the "tank-proxmox-isos" storage I had set up. It was configured with none content type.

Thanks so much for pointing me to that storage file! I was actually not using that storage, so I simply removed it and the messages are gone now.

Thanks! :D
 
  • Like
Reactions: Stoiko Ivanov

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get your own in 60 seconds.

Buy now!