Heaty will die, Schedy be born!

Again please…

I am so sorry, downloaded wheelstore again and now get this:

[establish] INFO - Created temporary directory '/tmp/tmpu7iwikbt'.
[establish] INFO - Creating wheels ...
Looking in links: /config/appdaemon/.wheelstore/wheelhouse
Collecting https://github.com/efficiosoft/hass-apps/archive/master.zip
  Downloading https://github.com/efficiosoft/hass-apps/archive/master.zip
Building wheels for collected packages: hass-apps
  Running setup.py bdist_wheel for hass-apps: started
  Running setup.py bdist_wheel for hass-apps: finished with status 'error'
  Complete output from command /usr/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-req-build-ipziz3a3/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-x0if08z3:
  usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: -c --help [cmd1 cmd2 ...]
     or: -c --help-commands
     or: -c cmd --help
  
  error: invalid command 'bdist_wheel'
  
  ----------------------------------------
  Failed building wheel for hass-apps
  Running setup.py clean for hass-apps
Failed to build hass-apps
ERROR: Failed to build one or more wheels

That’s not real… Then the wheel package is missing from the docker image you’re using and more work has to be done… will think about it later.

Ok, you’ve to download hass_apps_loader.py again.

EDIT: And wheelstore.py as well, please.

Okay we are getting there. It all start without errors and it looks like it caches the code. I see messages like:
Collecting daemonize (from appdaemon>=3.0->hass-apps==0.20190105.0) Downloading https://files.pythonhosted.org/packages/45/ad/1b20db02287afd40d3130a218ac5ce2f7d2ab581cfda29bada5e1c4bee17/daemonize-2.5.0-py2.py3-none-any.whl Saved /tmp/tmpybjsfxmb/daemonize-2.5.0-py2.py3-none-any.whl

But should I do something special to use it because if I start without internet connectivity I get the same timeout. (Expected) and this cause the container to terminate. (unexpected)

Could not install packages due to an EnvironmentError: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /efficiosoft/hass-apps/archive/master.zip (Caused by NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fd1703b2dd8>: Failed to establish a new connection: [Errno -3] Try again',)) FATAL: Failed installing package https://github.com/efficiosoft/hass-apps/archive/master.zip [cont-init.d] 81-python-packages.sh: exited 1. [cont-finish.d] executing container finish scripts.

That’s what I tried to tell you yesterday. You still request to have packages installed by continit, which then makes the container start fail. Currently, two scripts try to install the same package. That seems to be hassio, so remove the "python_packages" from the addon config. requirements.txt has no effect on the hassio image anyway.

he said he is not using hassio but plain docker. :wink:

Also thought so, but he has an image based on continit… and that’s used by the hassio addons only AFAIK.

Anyway, he somehow told continit to install additional python packages, what causes startup to fail.

In the long run, a solution like the wheelstore.py I wrote needs to be included in continit directly. What we do here is just a dirty workaround.

EDIT: I see, needs to go into the hassio addons, not continit. My fault.

ah, oke.
i just noticed that he did say that and thats why i pointed that out.

i really didnt take a look at your project untill now :wink: just here to see if there are any problems that are AD related.

Yeah, it’s not really a project yet, just a simple script to make AD in containerized environments resilient to network outages. As soon as you start using AD for something serious, you can’t accept that it just doesn’t start when there’s no internet connectivity :slight_smile:

We should add something like this to the native AD Docker image as well. I can look into this later.

I dont understand this part.
are docker installs from AD needing internet?

When your apps depend on third-party modules, yes.

hmm, i never liked docker. yet even less. :wink:
after that third party modules are installed there shouldnt be any need for internet anymore.

but we are only talking about when restarting AD right?
when AD is running, it doesnt rely on internet anymore?

When the container is created, it has a well-defined state: that of the image as specified in the Dockerfile. That’s the purpose of docker. User-specific packages are then installed upon container startup, and if there’s no internet connectivity, PyPi or GitHub servers down, or whatever -> BOOM.

The preferred way to cope with this is creating a custom docker image which is based on the AD image and extended with own packages and any other changes the user may like… but that requires some knowledge of docker.

hmm, and thats what most users here dont have. they use docker mostly because it is supposed to be easy.
i guess the best way to deal with this is to avoid third party modules if you want to create something general :stuck_out_tongue:

but its only if the container is started without internet. and that shouldnt happen much, because the container from AD shouldnt be restarted much at all. so allthough i see the problem, i think its a minor one.

Third-party modules can be anything, even hass-apps is third-party. A YAML parser is, voluptuous for config validation is… The requirements.txt file support added to AD recently is exactly for this.

It’s a severe issue. When I had a power outage, my container doesn’t come up anymore unless DSL connection and firewall are up again, which can take up to 5 minutes. Imagine you use this for heating control and your heating stops working because you had to reboot the machine and there’s a problem with your ISP, or simply GitHub is not reachable because of a DDOS attack (which happened some days ago btw.). That’s NO option.

1 Like

oke, i see the problem.
but i cant do anything with that, because i have no clue about docker :wink:
but indeed thats something you dont want.

thanks for making me see this.
im sure you find a solution (at least take it up with andrew)

and i am even more glad now that i use venv :wink:

1 Like