Tags: cloudify-cosmo/cloudify-agent
Tags
RD-7004 agent upgrade: reset package_url (#899) When upgrading, just ignore the old package_url, remove it, and then it'll be defaulted (in the script) to the newest on-manager package. Otherwise, upgrading 6.x agents, will attempt to fetch e.g. redhat-maipo-agent.tgz, which doesn't exist anymore (now it's just manylinux agents)
RD-4646 rewrite cloudify_agent.installer.operations.start (#851) * RD-4646 rewrite cloudify_agent.installer.operations.start (#845) * create_agent_config_and_installer: only allow one form Really, no need to allow both. It's gonna be simpler this way. * cloudify_agent.installer.operations.start: dont use retries rewrite this operation to use in-operation polling, rather than polling by retries. This way, agent installation is independent of manager retry settings. * flake * fixup the create_agent_config_and_installer decorator Did I forget hwo to write a decorator? Apparently so. This way is correct, though. * fix the tests: cloudify_agent/tests/installer/test_installation.py Multiple things wrong with these tests: - 3.2, I'm just donna drop that. That was some 7 years ago. - `assert_has_any_calls` is not a method. And calling a misspelling of a mock method assert used to just silently do nothing... however, the new version of mock, does throw an error on that. So, use a method that does exist instead: `assert_called_once` - `cloudify_agent.installer.operations.configure` is not part of the lifecycle. Only `create` and `start` are. See c-common/lifecycle.py. I don't know why would configure be asserted here, or if it should be, but it's just not. - `install_agent: true` forces install_method=remote. But, `start` is only called for plugin or init_script. But remote would only call create, not start. So use 'plugin' in the blueprint, so both are called. * start operation: refactor deadline handling no need to call time.time() twice, that's a syscall saved. * use logger.log parametrization this is tbh nicer than the "function if" * add several tests Co-authored-by: glukhman <47591609+glukhman@users.noreply.github.com> * py2-compatible syntax Co-authored-by: glukhman <47591609+glukhman@users.noreply.github.com> Co-authored-by: Łukasz Maksymczuk <lukasz@lukasz-maksymczuk.intra.codilime.com>
PreviousNext