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

Provision ix name attribute is broken #666

Open
urosgruber opened this issue Feb 20, 2019 · 6 comments
Open

Provision ix name attribute is broken #666

urosgruber opened this issue Feb 20, 2019 · 6 comments
Labels
bug compatibility Compatibility with other iocage variants

Comments

@urosgruber
Copy link
Contributor

Using ix provisioning plugin and using plexmediaserver as name does not work. Steps to recreate

ioc create foo provisioning.method=ixs provisioning.source=plexmediaserver template=yes
ioc provision foo

It throws an error

Traceback (most recent call last):
  File "/usr/local/bin/ioc", line 10, in <module>
    sys.dd:exit(cli())
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/ioc_cli/provision.py", line 65, in cli
    **start_args
  File "/usr/local/lib/python3.6/site-packages/ioc_cli/provision.py", line 102, in _provision
    print_function(_execute_provisioner(jail))
  File "/usr/local/lib/python3.6/site-packages/ioc_cli/__init__.py", line 87, in print_events
    for event in generator:
  File "/usr/local/lib/python3.6/site-packages/ioc_cli/provision.py", line 123, in _execute_provisioner
    for event in jail.provisioner.provision():
  File "/usr/local/lib/python3.6/site-packages/libioc/Provisioning/__init__.py", line 183, in provision
    Prototype.check_requirements(self)
  File "/usr/local/lib/python3.6/site-packages/libioc/Provisioning/__init__.py", line 142, in check_requirements
    if self.source is None:
  File "/usr/local/lib/python3.6/site-packages/libioc/Provisioning/__init__.py", line 133, in source
    return None if (config_value is None) else Source(config_value)
  File "/usr/local/lib/python3.6/site-packages/libioc/Provisioning/__init__.py", line 50, in __init__
    self.value = value
  File "/usr/local/lib/python3.6/site-packages/libioc/Provisioning/__init__.py", line 87, in value
    raise ValueError("Provisioning Source must be AbsolutePath or URL")
ValueError: Provisioning Source must be AbsolutePath or URL

Trying to use URL as name also fail because in the code

return (
            "https://raw.githubusercontent.com/freenas/iocage-ix-plugins"
            f"/master/{name}.json"
        )

you can see it should be a regular name and not the URL. I think it would be nice if name can be either URL or a name. But the actual check is done in init . I'm have very basic Python knowledge and trying to fix this would take a lot of time.

@gronke
Copy link
Member

gronke commented Feb 20, 2019

That regression was introduced when becoming stricter with the paths in the puppet provisioner. The source should be the index repository (https://github.com/freenas/iocage-ix-plugins) while the name defines the actual plugin to install. Therefore the provvision.name needs to be restore.

@urosgruber
Copy link
Contributor Author

Also one other thing I noticed, that overlay folder is not copied over as per iocage implementation. Should I create a separate ticket?

@gronke
Copy link
Member

gronke commented Feb 20, 2019

Also one other thing I noticed, that overlay folder is not copied over as per iocage implementation. Should I create a separate ticket?

Can be fixed in the same pull-request I guess. Maybe you spot even more differences.

@gronke gronke added bug compatibility Compatibility with other iocage variants labels Feb 20, 2019
@urosgruber
Copy link
Contributor Author

urosgruber commented Feb 20, 2019

I think this is what I found with a couple of bugs. I'll create a PR for one bug on events

  • overlay folder is not being copied over
  • if packagesite is set it should fetch from that site
  • fix provision.name and provision.source with support of a custom repo

@gronke
Copy link
Member

gronke commented Feb 20, 2019

@igalic would a provision.name be useful for puppet?

@igalic
Copy link
Collaborator

igalic commented Feb 20, 2019

if we had a bunch of different control-repos on the same host, and actually cached them, instead of of doing it per-jail…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug compatibility Compatibility with other iocage variants
Projects
None yet
Development

No branches or pull requests

3 participants