Skip to content

Detect host support for CPU realtime + add an option for enable it#2602

Merged
pvizeli merged 1 commit intomainfrom
detect-host-cpu-rt
Feb 22, 2021
Merged

Detect host support for CPU realtime + add an option for enable it#2602
pvizeli merged 1 commit intomainfrom
detect-host-cpu-rt

Conversation

@pvizeli
Copy link
Member

@pvizeli pvizeli commented Feb 22, 2021

Proposed change

Since docker don't handle that for us, we check if the kernel module is loaded. But as we not know if the local docker is setup correctly, we add also an option SUPERVISOR_CPU_RT=1 to enable this feature.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (which adds functionality to the supervisor)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast supervisor tests)
  • Tests have been added to verify that the new code works.

If API endpoints of add-on configuration are added/changed:

@pvizeli pvizeli merged commit e421284 into main Feb 22, 2021
@pvizeli pvizeli deleted the detect-host-cpu-rt branch February 22, 2021 12:30
@property
def cpu_rt_runtime(self) -> Optional[int]:
"""Limit CPU real-time runtime in microseconds."""
if not self.sys_docker.info.support_cpu_realtime:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we log this happens? As in, the creator expected this to work maybe?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would work because it's disabled. Only HAOS have the current problem with the wrong implementation

@github-actions github-actions bot locked and limited conversation to collaborators Feb 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants