systemd / systemd/systemd

systemctl set-property implies --runtime for transient units

Open
#7,106 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

pid1 RFE 🎁
Dominant language
C
Stars
16.7k
Forks
4.7k
Avg merge
1d 6h
Merged PRs (30d)
140

Description

Submission type
  • Bug report
systemd version the issue has been seen with
  • systemd-235
Used distribution
  • Fedora
In case of bug report: Expected behaviour you didn't see
  • systemctl set-property user-0.slice CPUShares=2048 creates drop-in 50-CPUShares.conf in /etc/systemd/system/user-0.slice.d directory
In case of bug report: Unexpected behaviour you saw

Drop-in is created in /run/systemd/transient/user-0.slice.d

In case of bug report: Steps to reproduce the problem
  1. log in as root
  2. systemctl set-property user-0.slice CPUShares=2048
  3. systemctl status user-0.slice
   Loaded: loaded (/run/systemd/transient/user-0.slice; transient; vendor preset: disabled)                                    
Transient: yes                                                 
  Drop-In: /run/systemd/transient/user-0.slice.d               
           └─50-CPUShares.conf                                 
   Active: active since Mon 2017-10-16 05:45:05 EDT; 1min 27s ago                                                              
    Tasks: 10 (limit: 10813)                                   
   Memory: 15.5M                                               
      CPU: 352ms                                               
   CGroup: /user.slice/user-0.slice                            
           ├─session-3.scope                                   
           │ ├─670 sshd: root [priv]                           
           │ ├─680 sshd: root@pts/0                            
           │ ├─880 bash -c cd ; bash -l                        
           │ ├─895 bash -l                                     
           │ ├─919 systemctl status user-0.slice               
           │ └─920 less                                        
           ├─session-5.scope                                   
           │ ├─779 sshd: root [priv]                           
           │ └─830 sshd: root                                  
           └─user@0.service                                    
             └─init.scope                                      
               ├─673 /usr/lib/systemd/systemd --user           
               └─675 (sd-pam)                        

Note that Drop-In references runtime config even though we didn't use --runtime option.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the behavior with systemctl set-property user-0.slice CPUShares=2048 and inspect the resulting systemctl status output. Compare the reported /run/systemd/transient/user-0.slice.d drop-in with the expected persistent /etc/systemd/system/user-0.slice.d location; done means the behavior matches the intended handling when --runtime is omitted.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux
Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.