Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exit_status needs to be i64 #4

Closed
nshalman opened this issue May 24, 2024 · 12 comments
Closed

exit_status needs to be i64 #4

nshalman opened this issue May 24, 2024 · 12 comments

Comments

@nshalman
Copy link

This is exciting! As usual I do weird things and find edge cases.
Ping me if you need more detail. I was excited to play with this. My system has some docker images and they made it sad.

use imagadm to import a docker image
run smartos-ui

see this in the logs:

 Error(\"unknown variant `docker`, expected one of `zone-dataset`, `lx-dataset`, `lxd`, `zvol`, `other`\", line: 0, column: 0)
@bahamat
Copy link
Member

bahamat commented May 25, 2024

Can you give me the full json of the image? Did you download it from docker hub or a private docker repo server?

@nshalman
Copy link
Author

It might not be the docker layers after all. I was rushing to file the bug on Friday afternoon. This is a system that has a zones pool with all sorts of interesting and non-standard stuff on it. It probably actually failed on something else. I will purge the logs and attempt to get a fresh set of logs to upload to help diagnose what exactly it's unhappy about.

@nshalman
Copy link
Author

==> /var/log/smartos_ui_executor.log <==
{"msg":"smartos_ui_executor v0.1.19","v":0,"name":"smartos_ui_executor","level":30,"time":"2024-05-26T14:33:15.907159948Z","hostname":"smartos","pid":65858}
{"msg":"listening","v":0,"name":"smartos_ui_executor","level":30,"time":"2024-05-26T14:33:15.907283033Z","hostname":"smartos","pid":65858,"local_addr":"127.0.0.1:8881"}
{"msg":"accepted connection","v":0,"name":"smartos_ui_executor","level":30,"time":"2024-05-26T14:33:22.348975874Z","hostname":"smartos","pid":65858,"local_addr":"127.0.0.1:8881","remote_addr":"127.0.0.1:61614"}
{"msg":"request completed","v":0,"name":"smartos_ui_executor","level":30,"time":"2024-05-26T14:33:22.349619616Z","hostname":"smartos","pid":65858,"uri":"/pwhash","method":"GET","req_id":"ec33695a-381c-4d8e-af95-a8329d6a001e","remote_addr":"127.0.0.1:61614","local_addr":"127.0.0.1:8881","latency_us":367,"response_code":"200"}
{"msg":"client disconnected before response returned","v":0,"name":"smartos_ui_executor","level":40,"time":"2024-05-26T14:33:23.012546218Z","hostname":"smartos","pid":65858,"uri":"/image","method":"GET","req_id":"eab21ae4-29ab-465d-8760-f900ee22973e","remote_addr":"127.0.0.1:61614","local_addr":"127.0.0.1:8881"}

==> /var/log/smartos_ui.log <==
{"msg":"Running on illumos, dropping privileges","v":0,"name":"smartos_ui","level":30,"time":"2024-05-26T14:33:05.827602035Z","hostname":"smartos","pid":65852}
{"msg":"smartos_ui v0.1.19-70d0cb7","v":0,"name":"smartos_ui","level":30,"time":"2024-05-26T14:33:05.828276523Z","hostname":"smartos","pid":65852}
{"msg":"listening","v":0,"name":"smartos_ui","level":30,"time":"2024-05-26T14:33:05.828562279Z","hostname":"smartos","pid":65852,"local_addr":"172.17.2.2:4443"}
{"msg":"listening","v":0,"name":"smartos_ui","level":30,"time":"2024-05-26T14:33:05.828616262Z","hostname":"smartos","pid":65852,"local_addr":"172.17.2.2:8880"}
{"msg":"accepted connection","v":0,"name":"smartos_ui","level":30,"time":"2024-05-26T14:33:22.346917534Z","hostname":"smartos","pid":65852,"local_addr":"172.17.2.2:4443","remote_addr":"172.17.2.110:48566"}
{"msg":"request completed","v":0,"name":"smartos_ui","level":30,"time":"2024-05-26T14:33:22.352018766Z","hostname":"smartos","pid":65852,"uri":"https://172.17.2.2:4443/login","method":"POST","req_id":"1692a01e-67bc-4442-bf6e-58f2382b60a3","remote_addr":"172.17.2.110:48566","local_addr":"172.17.2.2:4443","error_message_external":"Internal Server Error","error_message_internal":"error decoding response body: invalid value: integer `-134`, expected u64 at line 1 column 14414","latency_us":3651,"response_code":"500"}

@bahamat
Copy link
Member

bahamat commented May 26, 2024

Those log messages still seem to indicate that it's due to one or more images. If you can narrow it down to a subset of images that trigger this error then we can see what they all have in common.

@nshalman nshalman changed the title Doesn't seem to like docker layers. smartos_ui: "invalid value: integer -134, expected u64" Jun 9, 2024
@nshalman
Copy link
Author

nshalman commented Jun 9, 2024

Debugging would probably be assisted by #5.
I removed a bunch of unused images, but the ones that remain I'd rather not get rid of just yet if I don't have to.
I imagine one of my ancient ones is somehow the culprit...

I (still?) get this error:

{
  "msg": "request completed",
  "v": 0,
  "name": "smartos_ui",
  "level": 30,
  "time": "2024-06-09T15:57:06.002343789Z",
  "hostname": "smartos",
  "pid": 28183,
  "uri": "https://172.17.2.2:4443/login",
  "method": "POST",
  "req_id": "d54225f0-3c52-4c79-899b-bbebc15c9a47",
  "remote_addr": "172.17.2.122:59846",
  "local_addr": "172.17.2.2:4443",
  "error_message_external": "Internal Server Error",
  "error_message_internal": "error decoding response body: invalid value: integer `-134`, expected u64 at line 1 column 12659",
  "latency_us": 2803,
  "response_code": "500"
}
In case someone wants to try to debug this in the meantime, I have provided the full out put from

curl -q http://127.0.0.1:8881/image

[
  {
    "manifest": {
      "v": 2,
      "uuid": "07b33b7a-27a3-11e6-816f-df7d94eea009",
      "owner": "00000000-0000-0000-0000-000000000000",
      "name": "centos-7",
      "version": "20160601",
      "state": "active",
      "disabled": false,
      "public": true,
      "published_at": "2016-06-01T02:46:24Z",
      "type": "lx-dataset",
      "os": "linux",
      "files": [
        {
          "sha1": "7946ddf900c2606770f8f94348821200aa0bcda6",
          "size": 252959171,
          "compression": "gzip"
        }
      ],
      "description": "Container-native CentOS 7.2 64-bit image. Built to run on containers with bare metal speed, while offering all the services of a typical unix host.",
      "homepage": "https://docs.joyent.com/images/container-native-linux",
      "requirements": {
        "networks": [
          {
            "name": "net0",
            "description": "public"
          }
        ],
        "min_platform": {
          "7.0": "20151002T091442Z"
        },
        "brand": "lx"
      },
      "tags": {
        "role": "os",
        "kernel_version": "3.10.0"
      }
    },
    "zpool": "zones",
    "source": "https://images.joyent.com",
    "cloneNames": [],
    "clones": 0
  },
  {
    "manifest": {
      "v": 2,
      "uuid": "0b13305e-4fe1-11ee-b322-00151714048c",
      "owner": "00000000-0000-0000-0000-000000000000",
      "name": "base-64-trunk",
      "version": "20230910",
      "state": "active",
      "disabled": false,
      "public": true,
      "published_at": "2023-09-10T13:50:46Z",
      "type": "zone-dataset",
      "os": "smartos",
      "files": [
        {
          "sha1": "f3a3967d5badd104492f85eb3d95a87e4e7c7baf",
          "size": 224368556,
          "compression": "gzip"
        }
      ],
      "description": "A 64-bit SmartOS image with just essential packages installed. Ideal for users who are comfortable with setting up their own environment and tools.",
      "homepage": "https://docs.tritondatacenter.com/public-cloud/instances/infrastructure/images/smartos/base",
      "urn": "sdc:sdc:base-64-trunk:20230910",
      "requirements": {
        "min_platform": {
          "7.0": "20210826T002459Z"
        },
        "networks": [
          {
            "name": "net0",
            "description": "public"
          }
        ]
      },
      "tags": {
        "role": "os",
        "group": "base-64-trunk"
      }
    },
    "zpool": "zones",
    "source": "https://images.smartos.org",
    "cloneNames": [
      "zones/8e9661ac-7f41-4f02-9b13-00b531694e32"
    ],
    "clones": 1
  },
  {
    "manifest": {
      "v": 2,
      "uuid": "1d05e788-5409-11eb-b12f-037bd7fee4ee",
      "owner": "00000000-0000-0000-0000-000000000000",
      "name": "base-64-lts",
      "version": "20.4.0",
      "state": "active",
      "disabled": false,
      "public": true,
      "published_at": "2021-01-11T12:32:48Z",
      "type": "zone-dataset",
      "os": "smartos",
      "files": [
        {
          "sha1": "780cef741e2318b86ab668d4eca4093d8cac9d52",
          "size": 177242101,
          "compression": "gzip"
        }
      ],
      "description": "A 64-bit SmartOS image with just essential packages installed. Ideal for users who are comfortable with setting up their own environment and tools.",
      "homepage": "https://docs.joyent.com/images/smartos/base",
      "urn": "sdc:sdc:base-64-lts:20.4.0",
      "requirements": {
        "min_platform": {
          "7.0": "20141030T081701Z"
        },
        "networks": [
          {
            "name": "net0",
            "description": "public"
          }
        ]
      },
      "tags": {
        "role": "os",
        "group": "base-64-lts"
      }
    },
    "zpool": "zones",
    "source": "https://images.joyent.com",
    "cloneNames": [
      "zones/082a29ec-c2d9-449e-b9eb-9cfb1c0ce97d"
    ],
    "clones": 1
  },
  {
    "manifest": {
      "v": 2,
      "uuid": "1f32508c-e6e9-11e6-bc05-8fea9e979940",
      "owner": "00000000-0000-0000-0000-000000000000",
      "name": "base-64-lts",
      "version": "16.4.1",
      "state": "active",
      "disabled": false,
      "public": true,
      "published_at": "2017-01-30T12:39:20Z",
      "type": "zone-dataset",
      "os": "smartos",
      "files": [
        {
          "sha1": "9406da9175349ebd110505a9d881029973713a56",
          "size": 183858332,
          "compression": "gzip"
        }
      ],
      "description": "A 64-bit SmartOS image with just essential packages installed. Ideal for users who are comfortable with setting up their own environment and tools.",
      "homepage": "https://docs.joyent.com/images/smartos/base",
      "urn": "sdc:sdc:base-64-lts:16.4.1",
      "requirements": {
        "min_platform": {
          "7.0": "20141030T081701Z"
        },
        "networks": [
          {
            "name": "net0",
            "description": "public"
          }
        ]
      },
      "tags": {
        "role": "os",
        "group": "base-64-lts"
      }
    },
    "zpool": "zones",
    "source": "https://images.joyent.com",
    "cloneNames": [],
    "clones": 0
  },
  {
    "manifest": {
      "name": "qemu-kvm-bardiche-1.1.2",
      "version": "1.3.0",
      "type": "zone-dataset",
      "description": "Spice enabled QEMU (qemu-kvm-bardiche-1.1.2) (spice-0.12.2)",
      "published_at": "2014-04-05T15:15:46.0Z",
      "os": "QEMU",
      "files": [
        {
          "sha1": "f9f6dabedc78245a89a2c11f01a38fa73d51d196",
          "size": 7377509,
          "compression": "bzip2"
        }
      ],
      "requirements": {},
      "uuid": "27720d5a-bcd5-11e3-8581-1b797a446016",
      "urn": "elys:elys:qemu-kvm-bardiche-1.1.2:1.3.0",
      "owner": "d47a42fa-cac5-11e1-957f-0f9d2e4286c7",
      "public": true,
      "disabled": false,
      "state": "active",
      "v": 2
    },
    "zpool": "zones",
    "cloneNames": [],
    "clones": 0
  },
  {
    "manifest": {
      "v": 2,
      "uuid": "39f99738-9a4c-11ec-8e1c-3b65b9abc26a",
      "owner": "00000000-0000-0000-0000-000000000000",
      "name": "minimal-64-trunk",
      "version": "20220302",
      "state": "active",
      "disabled": false,
      "public": true,
      "published_at": "2022-03-02T17:14:32Z",
      "type": "zone-dataset",
      "os": "smartos",
      "files": [
        {
          "sha1": "34881e3be0be922ef32fc2f8e74010cb8df2c1ef",
          "size": 35070516,
          "compression": "gzip"
        }
      ],
      "description": "A 64-bit SmartOS image with just bootstrap packages installed. Ideal for users who want the smallest possible image upon which to build.",
      "homepage": "https://docs.joyent.com/images/smartos/minimal",
      "urn": "sdc:sdc:minimal-64-trunk:20220302",
      "requirements": {
        "min_platform": {
          "7.0": "20210826T002459Z"
        },
        "networks": [
          {
            "name": "net0",
            "description": "public"
          }
        ]
      },
      "tags": {
        "role": "os",
        "group": "minimal-64-trunk"
      }
    },
    "zpool": "zones",
    "source": "https://images.smartos.org",
    "cloneNames": [
      "zones/2bac0381-2ad9-6a2f-bc33-aa47867b7d61"
    ],
    "clones": 1
  },
  {
    "manifest": {
      "v": 2,
      "uuid": "3dbbdcca-2eab-11e8-b925-23bf77789921",
      "owner": "00000000-0000-0000-0000-000000000000",
      "name": "centos-7",
      "version": "20180323",
      "state": "active",
      "disabled": false,
      "public": true,
      "published_at": "2018-03-23T15:02:44Z",
      "type": "lx-dataset",
      "os": "linux",
      "files": [
        {
          "sha1": "b022d44a71e1c057a9ae1213f2f6716ce41a4407",
          "size": 262120284,
          "compression": "gzip"
        }
      ],
      "description": "Container-native CentOS 7.4 64-bit image. Built to run on containers with bare metal speed, while offering all the services of a typical unix host.",
      "homepage": "https://docs.joyent.com/images/container-native-linux",
      "requirements": {
        "networks": [
          {
            "name": "net0",
            "description": "public"
          }
        ],
        "min_platform": {
          "7.0": "20160317T000105Z"
        },
        "brand": "lx"
      },
      "tags": {
        "role": "os",
        "kernel_version": "3.10.0"
      }
    },
    "zpool": "zones",
    "source": "https://images.joyent.com",
    "cloneNames": [
      "zones/171186db-d97c-c1c1-ce24-f32f56d67418"
    ],
    "clones": 1
  },
  {
    "manifest": {
      "v": 2,
      "uuid": "48884af9-9fac-4bca-ab25-2c7e1cd9ab5a",
      "owner": "00000000-0000-0000-0000-000000000000",
      "name": "ubuntu-20.04",
      "version": "20230713",
      "state": "active",
      "disabled": false,
      "public": true,
      "published_at": "2023-07-13T23:29:14Z",
      "type": "zvol",
      "os": "linux",
      "files": [
        {
          "sha1": "196aae463d015743832ac129abd0dd630458e4d0",
          "size": 402085230,
          "compression": "gzip"
        }
      ],
      "description": "Ubuntu 20.04 LTS (Jammy Jellyfish). Built to run on bhyve or KVM virtual machines.",
      "homepage": "https://docs.tritondatacenter.com/public-cloud/instances/virtual-machines/images/linux",
      "requirements": {
        "networks": [
          {
            "name": "net0",
            "description": "public"
          }
        ],
        "ssh_key": true
      },
      "users": [
        {
          "name": "root"
        }
      ],
      "nic_driver": "virtio",
      "disk_driver": "virtio",
      "cpu_type": "host",
      "image_size": 10240,
      "tags": {
        "role": "os"
      }
    },
    "zpool": "zones",
    "source": "https://images.smartos.org",
    "cloneNames": [
      "zones/67ecd340-f805-4598-afa6-b710861e0281/disk0",
      "zones/789eb3ae-6b5e-c41b-a171-e19997242f33/disk0"
    ],
    "clones": 2
  },
  {
    "manifest": {
      "v": 2,
      "uuid": "5417ab20-3156-11ea-8b19-2b66f5e7a439",
      "owner": "00000000-0000-0000-0000-000000000000",
      "name": "minimal-64-lts",
      "version": "19.4.0",
      "state": "active",
      "disabled": false,
      "public": true,
      "published_at": "2020-01-07T14:02:23Z",
      "type": "zone-dataset",
      "os": "smartos",
      "files": [
        {
          "sha1": "503a4892c40ac8bb4d395c9fad8239599bb49ca7",
          "size": 31490558,
          "compression": "gzip"
        }
      ],
      "description": "A 64-bit SmartOS image with just bootstrap packages installed. Ideal for users who want the smallest possible image upon which to build.",
      "homepage": "https://docs.joyent.com/images/smartos/minimal",
      "urn": "sdc:sdc:minimal-64-lts:19.4.0",
      "requirements": {
        "min_platform": {
          "7.0": "20141030T081701Z"
        },
        "networks": [
          {
            "name": "net0",
            "description": "public"
          }
        ]
      },
      "tags": {
        "role": "os",
        "group": "minimal-64-lts"
      }
    },
    "zpool": "zones",
    "source": "https://images.joyent.com",
    "cloneNames": [
      "zones/df807956-2222-67df-e68c-cc5f3e03649d"
    ],
    "clones": 1
  },
  {
    "manifest": {
      "v": 2,
      "uuid": "6db48df2-e1a3-11e5-8ca6-8ff02d5c69dc",
      "owner": "00000000-0000-0000-0000-000000000000",
      "name": "base-multiarch-lts",
      "version": "15.4.1",
      "state": "active",
      "disabled": false,
      "public": true,
      "published_at": "2016-03-04T00:52:54Z",
      "type": "zone-dataset",
      "os": "smartos",
      "files": [
        {
          "sha1": "5c21262f650b4212d44fd0a5060ece481953edf0",
          "size": 377863971,
          "compression": "gzip"
        }
      ],
      "description": "A multiarch SmartOS image with just essential packages installed. Ideal for users who are comfortable with setting up their own environment and tools.",
      "homepage": "https://docs.joyent.com/images/smartos/base",
      "urn": "sdc:sdc:base-multiarch-lts:15.4.1",
      "requirements": {
        "min_platform": {
          "7.0": "20141030T081701Z"
        },
        "networks": [
          {
            "name": "net0",
            "description": "public"
          }
        ]
      },
      "tags": {
        "role": "os",
        "group": "base-multiarch-lts"
      }
    },
    "zpool": "zones",
    "source": "https://images.joyent.com",
    "cloneNames": [],
    "clones": 0
  },
  {
    "manifest": {
      "v": 2,
      "uuid": "7b5981c4-1889-11e7-b4c5-3f3bdfc9b88b",
      "owner": "00000000-0000-0000-0000-000000000000",
      "name": "ubuntu-16.04",
      "version": "20170403",
      "state": "active",
      "disabled": false,
      "public": true,
      "published_at": "2017-04-03T16:20:41Z",
      "type": "lx-dataset",
      "os": "linux",
      "files": [
        {
          "sha1": "dc03cb563d6c5956e0c34b15b1ee2a012eb04f3d",
          "size": 137313766,
          "compression": "gzip"
        }
      ],
      "description": "Container-native Ubuntu 16.04 64-bit image. Built to run on containers with bare metal speed, while offering all the services of a typical unix host.",
      "homepage": "https://docs.joyent.com/images/container-native-linux",
      "requirements": {
        "networks": [
          {
            "name": "net0",
            "description": "public"
          }
        ],
        "min_platform": {
          "7.0": "20160317T000105Z"
        },
        "brand": "lx"
      },
      "tags": {
        "role": "os",
        "kernel_version": "4.3.0"
      }
    },
    "zpool": "zones",
    "source": "https://images.joyent.com",
    "cloneNames": [
      "zones/233e72e6-8f96-4aad-86d8-a58bc33bf4c6"
    ],
    "clones": 1
  },
  {
    "manifest": {
      "v": 2,
      "uuid": "9ad5a702-11e7-11eb-b237-3be202719561",
      "owner": "00000000-0000-0000-0000-000000000000",
      "name": "minimal-64-trunk",
      "version": "20201019",
      "state": "active",
      "disabled": false,
      "public": true,
      "published_at": "2020-10-19T08:46:39Z",
      "type": "zone-dataset",
      "os": "smartos",
      "files": [
        {
          "sha1": "f9626b6c712c36488a58ef36bf3ab5e034d4eda5",
          "size": 34082822,
          "compression": "gzip"
        }
      ],
      "description": "A 64-bit SmartOS image with just bootstrap packages installed. Ideal for users who want the smallest possible image upon which to build.",
      "homepage": "https://docs.joyent.com/images/smartos/minimal",
      "urn": "sdc:sdc:minimal-64-trunk:20201019",
      "requirements": {
        "min_platform": {
          "7.0": "20141030T081701Z"
        },
        "networks": [
          {
            "name": "net0",
            "description": "public"
          }
        ]
      },
      "tags": {
        "role": "os",
        "group": "minimal-64-trunk"
      }
    },
    "zpool": "zones",
    "source": "https://images.joyent.com",
    "cloneNames": [
      "zones/7bff74f1-5dc7-c843-d7b2-c9b59bb02cbb"
    ],
    "clones": 1
  },
  {
    "manifest": {
      "v": 2,
      "uuid": "ad6f47f2-c691-11ea-a6a5-cf0776f07bb7",
      "owner": "00000000-0000-0000-0000-000000000000",
      "name": "base-64",
      "version": "20.2.0",
      "state": "active",
      "disabled": false,
      "public": true,
      "published_at": "2020-07-15T11:52:37Z",
      "type": "zone-dataset",
      "os": "smartos",
      "files": [
        {
          "sha1": "9a2c60ad3be8fe858be51037c93c6c9e34895da8",
          "size": 175113451,
          "compression": "gzip"
        }
      ],
      "description": "A 64-bit SmartOS image with just essential packages installed. Ideal for users who are comfortable with setting up their own environment and tools.",
      "homepage": "https://docs.joyent.com/images/smartos/base",
      "urn": "sdc:sdc:base-64:20.2.0",
      "requirements": {
        "min_platform": {
          "7.0": "20141030T081701Z"
        },
        "networks": [
          {
            "name": "net0",
            "description": "public"
          }
        ]
      },
      "tags": {
        "role": "os",
        "group": "base-64"
      }
    },
    "zpool": "zones",
    "source": "https://images.joyent.com",
    "cloneNames": [
      "zones/444e790b-0ddb-650d-8e03-c81cc6c66b1d",
      "zones/e1e22559-b343-6d5f-9633-9a1bc0f90f1d"
    ],
    "clones": 2
  },
  {
    "manifest": {
      "v": 2,
      "uuid": "ca301a44-fed2-11ec-acd8-3b6322c3bcea",
      "owner": "00000000-0000-0000-0000-000000000000",
      "name": "base-64-trunk",
      "version": "20220708",
      "state": "active",
      "disabled": false,
      "public": true,
      "published_at": "2022-07-08T15:29:43Z",
      "type": "zone-dataset",
      "os": "smartos",
      "files": [
        {
          "sha1": "e5fa27c9197e53730b216a117238b82ea74261f3",
          "size": 184008226,
          "compression": "gzip"
        }
      ],
      "description": "A 64-bit SmartOS image with just essential packages installed. Ideal for users who are comfortable with setting up their own environment and tools.",
      "homepage": "https://docs.tritondatacenter.com/public-cloud/instances/infrastructure/images/smartos/base",
      "urn": "sdc:sdc:base-64-trunk:20220708",
      "requirements": {
        "min_platform": {
          "7.0": "20210826T002459Z"
        },
        "networks": [
          {
            "name": "net0",
            "description": "public"
          }
        ]
      },
      "tags": {
        "role": "os",
        "group": "base-64-trunk"
      }
    },
    "zpool": "zones",
    "source": "https://images.joyent.com",
    "cloneNames": [
      "zones/4170c0a1-b746-c8bb-fcd3-b0b8e6dd0583"
    ],
    "clones": 1
  },
  {
    "manifest": {
      "v": 2,
      "uuid": "cccbdd29-adc0-4231-ac2c-26b4a762df5f",
      "owner": "00000000-0000-0000-0000-000000000000",
      "name": "ubuntu-22.04",
      "version": "20231127",
      "state": "active",
      "disabled": false,
      "public": true,
      "published_at": "2023-11-27T04:27:35Z",
      "type": "zvol",
      "os": "linux",
      "files": [
        {
          "sha1": "fffe146c7e2e68e14a2faea734f620e9a7bac30b",
          "size": 408108000,
          "compression": "gzip"
        }
      ],
      "description": "Ubuntu 22.04 LTS (Jammy Jellyfish). Built to run on bhyve or KVM virtual machines.",
      "homepage": "https://docs.tritondatacenter.com/public-cloud/instances/virtual-machines/images/linux",
      "requirements": {
        "min_ram": 500,
        "networks": [
          {
            "name": "net0",
            "description": "public"
          }
        ],
        "ssh_key": true
      },
      "users": [
        {
          "name": "root"
        }
      ],
      "nic_driver": "virtio",
      "disk_driver": "virtio",
      "cpu_type": "host",
      "image_size": 10240,
      "tags": {
        "role": "os"
      }
    },
    "zpool": "zones",
    "source": "https://images.smartos.org",
    "cloneNames": [
      "zones/b8a26cca-94b2-45f9-93c1-1d1dc24584f2/disk0"
    ],
    "clones": 1
  },
  {
    "manifest": {
      "v": 2,
      "uuid": "cfa9c88e-03f8-11eb-9980-879ff7980a9f",
      "owner": "00000000-0000-0000-0000-000000000000",
      "name": "base-64",
      "version": "20.3.0",
      "state": "active",
      "disabled": false,
      "public": true,
      "published_at": "2020-10-01T15:14:33Z",
      "type": "zone-dataset",
      "os": "smartos",
      "files": [
        {
          "sha1": "233b1f1fe66fa618cb5b7c54bbf2fd3eaefccef1",
          "size": 175349965,
          "compression": "gzip"
        }
      ],
      "description": "A 64-bit SmartOS image with just essential packages installed. Ideal for users who are comfortable with setting up their own environment and tools.",
      "homepage": "https://docs.joyent.com/images/smartos/base",
      "urn": "sdc:sdc:base-64:20.3.0",
      "requirements": {
        "min_platform": {
          "7.0": "20141030T081701Z"
        },
        "networks": [
          {
            "name": "net0",
            "description": "public"
          }
        ]
      },
      "tags": {
        "role": "os",
        "group": "base-64"
      }
    },
    "zpool": "zones",
    "source": "https://images.joyent.com",
    "cloneNames": [
      "zones/bba69b00-4c50-e812-e693-faba4249720d"
    ],
    "clones": 1
  },
  {
    "manifest": {
      "v": 2,
      "uuid": "d0e36a16-1fed-4974-a24e-a29245070445",
      "owner": "00000000-0000-0000-0000-000000000000",
      "name": "ubuntu-22.04",
      "version": "20220923",
      "state": "active",
      "disabled": false,
      "public": true,
      "published_at": "2022-09-23T19:14:06Z",
      "type": "lx-dataset",
      "os": "linux",
      "files": [
        {
          "sha1": "e29e3dd1c83d91e12b79744f8c6b668dab77b1de",
          "size": 117575689,
          "compression": "gzip"
        }
      ],
      "description": "Ubuntu 22.04 LTS 64-bit image. Built to run on containers with bare metal speed, while offering all the services of a typical unix host.",
      "homepage": "https://docs.tritondatacenter.com/public-cloud/instances/infrastructure/images",
      "requirements": {
        "brand": "lx",
        "min_platform": {
          "7.0": "20220407T001427Z"
        },
        "networks": [
          {
            "description": "public",
            "name": "net0"
          }
        ]
      },
      "tags": {
        "kernel_version": "5.10.0",
        "role": "os"
      }
    },
    "zpool": "zones",
    "source": "https://images.smartos.org",
    "cloneNames": [
      "zones/75973814-6131-c4cd-e922-ace19c3bd233"
    ],
    "clones": 1
  },
  {
    "manifest": {
      "v": 2,
      "uuid": "d89041d8-41b9-481d-918a-722be4598dd1",
      "owner": "00000000-0000-0000-0000-000000000000",
      "name": "debian-12",
      "version": "20231127",
      "state": "active",
      "disabled": false,
      "public": true,
      "published_at": "2023-11-27T03:26:37Z",
      "type": "zvol",
      "os": "linux",
      "files": [
        {
          "sha1": "453fbade9c6929984f9443ba81017b86e84c290f",
          "size": 425883030,
          "compression": "gzip"
        }
      ],
      "description": "Debian 12 (bookworm) 64-bit image with just essential packages installed. Built to run on bhyve or KVM virtual machines.",
      "homepage": "https://docs.tritondatacenter.com/public-cloud/instances/virtual-machines/images/linux",
      "requirements": {
        "min_ram": 500,
        "networks": [
          {
            "name": "net0",
            "description": "public"
          }
        ],
        "ssh_key": true
      },
      "users": [
        {
          "name": "root"
        }
      ],
      "nic_driver": "virtio",
      "disk_driver": "virtio",
      "cpu_type": "host",
      "image_size": 10240,
      "tags": {
        "role": "os"
      }
    },
    "zpool": "zones",
    "source": "https://images.smartos.org",
    "cloneNames": [
      "zones/cc947622-e2cc-4c17-a48c-5998aeff0c1f/disk0"
    ],
    "clones": 1
  },
  {
    "manifest": {
      "v": 2,
      "uuid": "db382b98-822e-11ee-992e-00151714048c",
      "owner": "00000000-0000-0000-0000-000000000000",
      "name": "base-64-trunk",
      "version": "20231113",
      "state": "active",
      "disabled": false,
      "public": true,
      "published_at": "2023-11-13T14:13:45Z",
      "type": "zone-dataset",
      "os": "smartos",
      "files": [
        {
          "sha1": "dd98240769015bcf2cdb517d922427f7570da637",
          "size": 244134641,
          "compression": "gzip"
        }
      ],
      "description": "A 64-bit SmartOS image with just essential packages installed. Ideal for users who are comfortable with setting up their own environment and tools.",
      "homepage": "https://docs.tritondatacenter.com/public-cloud/instances/infrastructure/images/smartos/base",
      "urn": "sdc:sdc:base-64-trunk:20231113",
      "requirements": {
        "min_platform": {
          "7.0": "20210826T002459Z"
        },
        "networks": [
          {
            "name": "net0",
            "description": "public"
          }
        ]
      },
      "tags": {
        "role": "os",
        "group": "base-64-trunk"
      }
    },
    "zpool": "zones",
    "source": "https://images.smartos.org",
    "cloneNames": [
      "zones/590bf511-e0a2-4d6e-b582-68b391b1d0ef"
    ],
    "clones": 1
  },
  {
    "manifest": {
      "name": "qemu-kvm-1.1.2-bardiche",
      "version": "1.2.0",
      "type": "zone-dataset",
      "description": "Spice enabled QEMU (qemu-kvm-1.1.2-bardiche) (spice-0.12.2)",
      "published_at": "2014-04-05T14:02:13.0Z",
      "os": "QEMU",
      "files": [
        {
          "sha1": "41ba62feeb6ce3daf287a481939e207e9be74808",
          "size": 7375378,
          "compression": "bzip2"
        }
      ],
      "requirements": {},
      "uuid": "e10cc648-bcca-11e3-97bf-63a04be9c275",
      "urn": "elys:elys:qemu-kvm-1.1.2-bardiche:1.2.0",
      "owner": "d47a42fa-cac5-11e1-957f-0f9d2e4286c7",
      "public": true,
      "disabled": false,
      "state": "active",
      "v": 2
    },
    "zpool": "zones",
    "cloneNames": [],
    "clones": 0
  },
  {
    "manifest": {
      "v": 2,
      "uuid": "e6b8e342-c19d-11ed-b9d1-00151714048c",
      "owner": "00000000-0000-0000-0000-000000000000",
      "name": "base-64-trunk",
      "version": "20230313",
      "state": "active",
      "disabled": false,
      "public": true,
      "published_at": "2023-03-13T12:52:24Z",
      "type": "zone-dataset",
      "os": "smartos",
      "files": [
        {
          "sha1": "411247c8e329eae5c94df46d14f7c800b463bbab",
          "size": 262252760,
          "compression": "gzip"
        }
      ],
      "description": "A 64-bit SmartOS image with just essential packages installed. Ideal for users who are comfortable with setting up their own environment and tools.",
      "homepage": "https://docs.tritondatacenter.com/public-cloud/instances/infrastructure/images/smartos/base",
      "urn": "sdc:sdc:base-64-trunk:20230313",
      "requirements": {
        "min_platform": {
          "7.0": "20210826T002459Z"
        },
        "networks": [
          {
            "name": "net0",
            "description": "public"
          }
        ]
      },
      "tags": {
        "role": "os",
        "group": "base-64-trunk"
      }
    },
    "zpool": "zones",
    "source": "https://images.smartos.org",
    "cloneNames": [
      "zones/dd63e244-7534-4896-96cd-050c9527d191"
    ],
    "clones": 1
  },
  {
    "manifest": {
      "v": 1,
      "name": "qemu-kvm-1.1.2",
      "version": "1.0",
      "state": "active",
      "type": "zone-dataset",
      "description": "Spice enabled QEMU (qemu-kvm-1.1.2)",
      "published_at": "2013-02-01T13:47:41.0Z",
      "os": "QEMU",
      "files": [
        {
          "path": "qemu-kvm-1.1.2-1.0.zfs.bz2",
          "sha1": "f76cbcecc7c603121fa4053b47ca141122ad9126",
          "size": 7141486,
          "url": "http://datasets.shalman.org/datasets/f0c511e0-6c75-11e2-8cde-aff76d3c915c/qemu-kvm-1.1.2-1.0.zfs.bz2"
        }
      ],
      "requirements": {},
      "uuid": "f0c511e0-6c75-11e2-8cde-aff76d3c915c",
      "creator_uuid": "d47a42fa-cac5-11e1-957f-0f9d2e4286c7",
      "vendor_uuid": "d47a42fa-cac5-11e1-957f-0f9d2e4286c7",
      "creator_name": "elys",
      "platform_type": "smartos",
      "cloud_name": "elys",
      "urn": "elys:elys:qemu-kvm-1.1.2:1.0",
      "created_at": "2013-02-01T13:47:41.0Z",
      "updated_at": "2013-02-01T13:47:41.0Z"
    },
    "zpool": "zones",
    "source": "http://datasets.shalman.org/datasets",
    "cloneNames": [],
    "clones": 0
  },
  {
    "manifest": {
      "v": 2,
      "uuid": "f3a6e1a2-9d71-11e9-9bd2-e7e5b4a5c141",
      "owner": "00000000-0000-0000-0000-000000000000",
      "name": "base-64",
      "version": "19.2.0",
      "state": "active",
      "disabled": false,
      "public": true,
      "published_at": "2019-07-03T09:07:15Z",
      "type": "zone-dataset",
      "os": "smartos",
      "files": [
        {
          "sha1": "0aa4da9a8a4df90048f1f6f507e958dd559062aa",
          "size": 184857790,
          "compression": "gzip"
        }
      ],
      "description": "A 64-bit SmartOS image with just essential packages installed. Ideal for users who are comfortable with setting up their own environment and tools.",
      "homepage": "https://docs.joyent.com/images/smartos/base",
      "urn": "sdc:sdc:base-64:19.2.0",
      "requirements": {
        "min_platform": {
          "7.0": "20141030T081701Z"
        },
        "networks": [
          {
            "name": "net0",
            "description": "public"
          }
        ]
      },
      "tags": {
        "role": "os",
        "group": "base-64"
      }
    },
    "zpool": "zones",
    "source": "https://images.joyent.com",
    "cloneNames": [
      "zones/926366b6-3f26-66c0-fe63-9624d2684c17"
    ],
    "clones": 1
  }
]

@davidedpg10
Copy link

I just installed SmartOS and this UI, and am now seeing this issue. It started happening when I created an instance with the ubuntu-24.04 image of type zvol published by Triton: https://smartos.org/images/#/view/5135b4bb-da9e-48e2-8965-7424267ad23e
Then the UI has not worked since, same -134 integer issue

@bahamat
Copy link
Member

bahamat commented Aug 21, 2024

Can you show me the full output of vmadm get <uuid> for that instance?

@davidedpg10
Copy link

Can you show me the full output of vmadm get <uuid> for that instance?

Sure can:

{
  "zonename": "fa1ae35c-eb71-48b9-bed0-0cca520d0e87",
  "autoboot": true,
  "brand": "kvm",
  "limit_priv": "default,-file_link_any,-net_access,-proc_fork,-proc_info,-proc_session",
  "v": 1,
  "create_timestamp": "2024-08-22T02:50:54.668Z",
  "cpu_shares": 100,
  "max_lwps": 2000,
  "max_msg_ids": 4096,
  "max_sem_ids": 4096,
  "max_shm_ids": 4096,
  "max_shm_memory": 9213,
  "zfs_io_priority": 100,
  "max_physical_memory": 9213,
  "max_locked_memory": 9213,
  "max_swap": 9213,
  "cpu_cap": 100,
  "billing_id": "00000000-0000-0000-0000-000000000000",
  "owner_uuid": "00000000-0000-0000-0000-000000000000",
  "hostname": "UbuntuVM",
  "resolvers": [
    "10.0.0.254"
  ],
  "alias": "UbuntuVM",
  "ram": 8189,
  "vcpus": 4,
  "device": null,
  "disks": [
    {
      "path": "/dev/zvol/rdsk/zones/fa1ae35c-eb71-48b9-bed0-0cca520d0e87-disk0",
      "boot": true,
      "model": "virtio",
      "media": "disk",
      "image_size": 10240,
      "image_uuid": "5135b4bb-da9e-48e2-8965-7424267ad23e",
      "zfs_filesystem": "zones/fa1ae35c-eb71-48b9-bed0-0cca520d0e87-disk0",
      "zpool": "zones",
      "size": 10240,
      "compression": "off",
      "refreservation": 10563,
      "block_size": 8192
    }
  ],
  "nics": [
    {
      "interface": "net0",
      "mac": "62:f4:b2:cf:99:58",
      "nic_tag": "admin",
      "ip": "dhcp",
      "ips": [
        "dhcp"
      ],
      "model": "virtio",
      "primary": true
    }
  ],
  "state": "provisioning",
  "transition_to": "running",
  "transition_expire": 1724295354668,
  "uuid": "fa1ae35c-eb71-48b9-bed0-0cca520d0e87",
  "zone_state": "installed",
  "zonepath": "/zones/fa1ae35c-eb71-48b9-bed0-0cca520d0e87",
  "hvm": true,
  "zoneid": null,
  "zonedid": 6,
  "last_modified": "2024-08-22T02:51:01.000Z",
  "exit_status": -134,
  "exit_timestamp": "2024-08-22T02:51:01.160Z",
  "firewall_enabled": false,
  "server_uuid": "08f18e28-d47e-e611-88f1-fb2236831b00",
  "platform_buildstamp": "20240808T000421Z",
  "customer_metadata": {},
  "internal_metadata": {
    "root_pw": "<redacted>"
  },
  "routes": {},
  "tags": {},
  "quota": 10,
  "zfs_root_recsize": 131072,
  "zfs_filesystem": "zones/fa1ae35c-eb71-48b9-bed0-0cca520d0e87",
  "zpool": "zones",
  "snapshots": []
}

@bahamat
Copy link
Member

bahamat commented Aug 23, 2024

@davidedpg10 I have test build for you to try. Run uiadm install -b i4 latest to install it and let me know if that fixes it for you.

@bahamat bahamat changed the title smartos_ui: "invalid value: integer -134, expected u64" exit_status needs to be i64 Aug 23, 2024
@davidedpg10
Copy link

davidedpg10 commented Aug 23, 2024

Please ignore everything below. Keeping it there for posterity. I'm not sure why it had not taken effect prior, but now it's working with your latest changes of switching it to a signed 64 bit integer. It's no longer crashing on parse

image

image


> @davidedpg10 I have test build for you to try. Run uiadm install -b i4 latest to install it and let me know if that fixes it for you.

Thanks for the quick response @bahamat . I figured out last night what my issue was, I had not enabled Intel Virtualization Technology and VT-d on the machine where I was running SmartOS, which was causing the VM (Zone) to fail start up with exit code -134.

To test the build you are talking about, I disabled VT-d again, ran the command you mentioned (uiadm install -b i4 latest), and tried to run the same image, and the same error appeared, so it's not behaving differently.

{"msg":"request completed","v":0,"name":"smartos_ui","level":30,"time":"2024-08-23T02:53:36.084203245Z","hostname":"smartos1","pid":4393,"uri":"https://10.0.0.240:4443/login","method":"POST","req_id":"0af4991a-18ae-497e-89b1-c6a20c87fd30","remote_addr":"10.0.0.70:60152","local_addr":"10.0.0.240:4443","error_message_external":"Internal Server Error","error_message_internal":"error decoding response body: invalid value: integer `-134`, expected u64 at line 1 column 3789","latency_us":4161,"response_code":"500"}

It looks like it expects an unsigned (positive) integer in the exit_status of the Zone, so when it finds a negative number (which would require a signed integer) it crashes. So in theory, it should be just a matter of using a signed integer for the exit_status parsing right?

Can we try a build with this line switched from:

pub exit_status: Option<u64>,

to:

pub exit_status: Option<i64>,

or the equivalent of accepting a signed 64 bit integer?

@bahamat
Copy link
Member

bahamat commented Aug 23, 2024

OK, to summarize this issue, it seems that docker layers and images in general were unrelated to the issue being experienced. Both users reported exit_status=-134, which was corrected in #7.

So I think we can safely close this without needing any action regarding images (including docker-layer images). If something does come up in them, it will be unrelated to the root cause here, so it would be assigned a new issue ID.

@bahamat bahamat closed this as completed Aug 23, 2024
@nshalman
Copy link
Author

Confirmed fixed for me as well. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants