Skip to content

v0.1.12#1

Merged
Javinator9889 merged 9 commits into
mainfrom
master
Jun 16, 2022
Merged

v0.1.12#1
Javinator9889 merged 9 commits into
mainfrom
master

Conversation

@Javinator9889

Copy link
Copy Markdown
Collaborator

No description provided.

…ish`

Before this commit, there is no kind of mutual exclusion in between calling
`p.condition` and `manager.on_start`, so two processes can "request" more
resources than the ones really available on the system because of this. This
situation leaded to some "tricks" such as performing some actions at the
condition call, when they should have been done at the `on_start` call.

Right now, everything should be working in a known and expected way for all
the existing plugins and the new ones
If the condition wasn't satisfied, the action was run (which shouldn't happen).
It was because of the refactoring done, as a `return` statement was necessary
if the condition wasn't evaluated to `True`
…ators

We have detected some errors at Orcha's petition handler whenever an
`EmptyPetition` was enqueued:

```
 Traceback (most recent call last):
   File "/usr/lib/python3/dist-packages/orcha/lib/manager.py", line 287, in shutdown
     self.manager.shutdown()
   File "/usr/lib/python3/dist-packages/orcha/lib/processor.py", line 314, in _process
     self._internalq.put(p)
   File "/usr/lib/python3.9/queue.py", line 150, in put
     self._put(item)
   File "/usr/lib/python3.9/queue.py", line 236, in _put
     heappush(self.queue, item)
TypeError: '<' not supported between instances of 'EmptyPetition' and 'VagrantPetition'
```

That error was causing some troubles when we request the orchestrator to finish

In addition, we implemented new features for handling SystemD watchdog if we
are running as a service: every 5 seconds, a `WATCHDOG` is sent to notify about
our behavior. If an error occurs in a critical section thread, we notify about
such error and request a service restart, for safety reasons.
There was an issue with previous commit which caused:

```
Traceback (most recent call last):
  File "${DIST_PACKAGES}/orcha/__init__.py", line 25, in <module>
    from .interfaces import *
  File "${DIST_PACKAGES}/orcha/interfaces/__init__.py", line 24, in <module>
    from .petition import (
  File "${DIST_PACKAGES}/orcha/interfaces/petition.py", line 208, in <module>
    class EmptyPetition(Petition):
  File "/usr/lib/python3.7/dataclasses.py", line 983, in wrap
    return _process_class(cls, init, repr, eq, order, unsafe_hash, frozen)
  File "/usr/lib/python3.7/dataclasses.py", line 868, in _process_class
    raise TypeError('cannot inherit frozen dataclass from a '
TypeError: cannot inherit frozen dataclass from a non-frozen one
```

So then, child classes were updated so they are mutable
… clients

The internal digest key is not working properly on Python versions lower or
equal to 3.7, and it requires a manual fix. Such fix was introduced on server
side but never on client side, which now is
In addition, the `manager` itself has been updated for handling authentication
error that may be caused if the key is missing (showing a helpful message in
such situation).

As there is no exception throwing in that situation, the `connect` method was
updated so it returns a boolean indicating whether if the client has been
connected or not
@Javinator9889 Javinator9889 merged commit 61716e4 into main Jun 16, 2022
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

Successfully merging this pull request may close these issues.

1 participant