Skip to content

Fix boot order handling #85

Closed
Closed

Description

@mxmeinhold

The way we handle boot order is deprecated and should be fixed.

The problem

Proxstar is still using the old boot order format, which means that when it creates a new vm, proxmox sees no boot hard disk, and it will reboot into the installer ad nauseam. This is fixable, you can manually set the boot order in the vm's options page, but in doing so, proxstar won't be able to read the boot order, and thus the vm won't be viewable at all from proxstar, so users will need a proxmox account with at least PVEVMConsole permissions to access the vm, and PVEVMUSER to edit anything.

Stuff you probably need to fix this

d44698a will need to be reverted, and then the boot order handling form, route, and methods in vm.py will need to be adapted.

See the qm conf file docs for the boot parameter to see what needs to be handled.

Activity

  1. WillNilges commented on Aug 12, 2021

    @WillNilges
    Member

    Also seeing 500's trying to view the VM when I do the workaround through proxmox.

    2021-08-12 13:14:59,780 ERROR Exception on /vm/186 [GET]
    Traceback (most recent call last):
      File "/opt/app-root/lib64/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
        response = self.full_dispatch_request()
      File "/opt/app-root/lib64/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
        rv = self.handle_user_exception(e)
      File "/opt/app-root/lib64/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
        reraise(exc_type, exc_value, tb)
      File "/opt/app-root/lib64/python3.8/site-packages/flask/_compat.py", line 39, in reraise
        raise value
      File "/opt/app-root/lib64/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
        rv = self.dispatch_request()
      File "/opt/app-root/lib64/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
        return self.view_functions[rule.endpoint](**req.view_args)
      File "/opt/app-root/lib64/python3.8/site-packages/flask_pyoidc/flask_pyoidc.py", line 253, in wrapper
        return view_func(*args, **kwargs)
      File "/opt/app-root/src/proxstar/__init__.py", line 220, in vm_details
        return render_template(
      File "/opt/app-root/lib64/python3.8/site-packages/flask/templating.py", line 137, in render_template
        return _render(
      File "/opt/app-root/lib64/python3.8/site-packages/flask/templating.py", line 120, in _render
        rv = template.render(context)
      File "/opt/app-root/lib64/python3.8/site-packages/jinja2/environment.py", line 1090, in render
        self.environment.handle_exception()
      File "/opt/app-root/lib64/python3.8/site-packages/jinja2/environment.py", line 832, in handle_exception
        reraise(*rewrite_traceback_stack(source=source))
      File "/opt/app-root/lib64/python3.8/site-packages/jinja2/_compat.py", line 28, in reraise
        raise value.with_traceback(tb)
      File "/opt/app-root/src/proxstar/templates/vm_details.html", line 1, in top-level template code
        {% extends "base.html" %}
      File "/opt/app-root/src/proxstar/templates/base.html", line 90, in top-level template code
        {% block body %}
      File "/opt/app-root/src/proxstar/templates/vm_details.html", line 15, in block "body"
        {{ vm.boot_order|join(', ') }}
      File "/opt/app-root/lib64/python3.8/site-packages/jinja2/environment.py", line 471, in getattr
        return getattr(obj, attribute)
      File "/opt/app-root/src/proxstar/util.py", line 18, in _lazy_property
        setattr(self, attr_name, fn(self))
      File "/opt/app-root/src/proxstar/vm.py", line 126, in boot_order
        boot_order.append(boot_order_lookup[order])
    KeyError: 'o'
    
  2. self-assigned this
    on Sep 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions