cpu-affinity-range not applied when changing charm config

Bug #1913325 reported by Gábor Mészáros
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
charm-sysconfig
Fix Released
High
Unassigned

Bug Description

there's a missing flag to be checked when config-changed.

Tags: bseng-485

Related branches

Revision history for this message
Drew Freiberger (afreiberger) wrote :

There is a functional test that ensures this setting is changed.

https://git.launchpad.net/~gabor.meszaros/charm-sysconfig/tree/src/tests/functional/test_deploy.py#n214

Can you please help by explaining the exact scenario and versions of the charm you are running and what failed?

Is the issue that the file isn't updated, or is it that systemd needs to be daemon_reloaded, or did you have a service that needed restarted after the change was applied?

Changed in charm-sysconfig:
status: New → Incomplete
Revision history for this message
Vidar Tyldum (tyldum) wrote :

Hitting this on cs:sysconfig-3.
/etc/systemd/system.conf will not be updated/re-generated when setting cpu-affinity-range.

Revision history for this message
Xav Paice (xavpaice) wrote :

The line in tests `assert "CPUAffinity=1,2,3,4" in systemd_content` should ensure that the failure is picked up. The test reads /etc/systemd/system.conf.

I built a test system using the current 'master' for the charm, cpu-affinity-range was "". Content of /etc/systemd/system.conf included #CPUAffinity=1 2.

Change:
juju config sysconfig-focal-local cpu-affinity-range="1,2,3,4"

/etc/systemd/system.conf included CPUAffinity=1,2,3,4

My test was using focal, and charm code which at the time matches stable/21.04

Revision history for this message
Giuseppe Petralia (peppepetra) wrote :

I can't reproduce that either in candidate/21.10

Revision history for this message
Giuseppe Petralia (peppepetra) wrote :

I had a look again today and I can reproduce the bug when using focal despite the revision used.

I am marking this bug as valid

Changed in charm-sysconfig:
status: Incomplete → Confirmed
importance: Undecided → High
Revision history for this message
Giuseppe Petralia (peppepetra) wrote :

Workaround is relying on the deprecated cpu-range and reservation

i.e.

juju config sysconfig cpu-affinity-range="1,2,3,4" # Not working

Reconfigure with cpu-range

juju config sysconfig --reset cpu-affinity-range
juju config sysconfig cpu-range="1,2,3,4" reservation="affinity"

Eric Chen (eric-chen)
tags: added: bseng-485
Changed in charm-sysconfig:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.