Re: Kubelet/node nice level

2018-07-01 Thread Mateus Caruccio
Got it. So now I just need to fix my scripts. Thanks for clarifying.

--
Mateus Caruccio / Master of Puppets
GetupCloud.com
We make the infrastructure invisible
Gartner Cool Vendor 2017

2018-07-01 14:18 GMT-03:00 Clayton Coleman :

> That’s the one the installer lays down.  Ansible has never used the one in
> the RPMs (and the one in the RPMs is being removed in 3.10 to prevent
> confusion).
>
> On Jul 1, 2018, at 10:03 AM, Mateus Caruccio  com> wrote:
>
> Yep, I copy/paste from an old buffer. It's /bin/nice already. Same results.
>
> Anyway, I believe have found the reason. Looks like
> /etc/systemd/system/multi-user.target.wants is linking to the wrong unit
> file (or am I editing the wrong one?).
>
> # ls -l /etc/systemd/system/multi-user.target.wants/origin-node.service
> lrwxrwxrwx.  1 root root   39 Jul  1 13:42 /etc/systemd/system/multi-
> user.target.wants/origin-node.service ->
> */etc/systemd/system/origin-node.service*
>
> # cat /etc/systemd/system/origin-node.service
> [Unit]
> Description=OpenShift Node
> After=docker.service
> After=chronyd.service
> After=ntpd.service
> Wants=openvswitch.service
> After=ovsdb-server.service
> After=ovs-vswitchd.service
> Wants=docker.service
> Documentation=https://github.com/openshift/origin
> Wants=dnsmasq.service
> After=dnsmasq.service
>
> [Service]
> Type=notify
> EnvironmentFile=/etc/sysconfig/origin-node
> Environment=GOTRACEBACK=crash
> ExecStartPre=/usr/bin/cp /etc/origin/node/node-dnsmasq.conf
> /etc/dnsmasq.d/
> ExecStartPre=/usr/bin/dbus-send --system --dest=uk.org.thekelleys.dnsmasq
> /uk/org/thekelleys/dnsmasq uk.org.thekelleys.SetDomainServers
> array:string:/in-addr.arpa/127.0.0.1,/cluster.local/127.0.0.1
> ExecStopPost=/usr/bin/rm /etc/dnsmasq.d/node-dnsmasq.conf
> ExecStopPost=/usr/bin/dbus-send --system --dest=uk.org.thekelleys.dnsmasq
> /uk/org/thekelleys/dnsmasq uk.org.thekelleys.SetDomainServers
> array:string:
> ExecStart=/usr/bin/openshift start node  --config=${CONFIG_FILE} $OPTIONS
> LimitNOFILE=65536
> LimitCORE=infinity
> WorkingDirectory=/var/lib/origin/
> SyslogIdentifier=origin-node
> Restart=always
> RestartSec=5s
> TimeoutStartSec=300
> OOMScoreAdjust=-999
>
> [Install]
> WantedBy=multi-user.target
>
>
> After remove it, the link points to where I expect being the right unit
> file:
>
>
> # rm -f /etc/systemd/system/origin-node.service
>
> # systemctl disable origin-node
> Removed symlink /etc/systemd/system/multi-user.target.wants/origin-node.
> service.
>
> # systemctl enable origin-node
> Created symlink from /etc/systemd/system/multi-
> user.target.wants/origin-node.service to /usr/lib/systemd/system/
> origin-node.service.
>
> *# systemctl restart origin-node*
>
> # ps ax -o pid,nice,comm|grep openshift
>   4994   0 openshift
>   5036  -5 openshift
>
>
> The question now is: where /etc/systemd/system/origin-node.service comes
> from?
>
> --
> Mateus Caruccio / Master of Puppets
> GetupCloud.com
> We make the infrastructure invisible
> Gartner Cool Vendor 2017
>
> 2018-07-01 8:06 GMT-03:00 Tobias Florek :
>
>> Hi!
>>
>> > ExecStart=nice -n -5 /usr/bin/openshift start node [...]
>>
>> That won't work. You need the full path to the executable in systemd
>> units.
>>
>> Cheers,
>>  Tobias Florek
>>
>> ___
>> dev mailing list
>> dev@lists.openshift.redhat.com
>> http://lists.openshift.redhat.com/openshiftmm/listinfo/dev
>>
>>
> ___
> dev mailing list
> dev@lists.openshift.redhat.com
> http://lists.openshift.redhat.com/openshiftmm/listinfo/dev
>
>
___
dev mailing list
dev@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/dev


Re: Kubelet/node nice level

2018-07-01 Thread Clayton Coleman
That’s the one the installer lays down.  Ansible has never used the one in
the RPMs (and the one in the RPMs is being removed in 3.10 to prevent
confusion).

On Jul 1, 2018, at 10:03 AM, Mateus Caruccio 
wrote:

Yep, I copy/paste from an old buffer. It's /bin/nice already. Same results.

Anyway, I believe have found the reason. Looks like
/etc/systemd/system/multi-user.target.wants is linking to the wrong unit
file (or am I editing the wrong one?).

# ls -l /etc/systemd/system/multi-user.target.wants/origin-node.service
lrwxrwxrwx.  1 root root   39 Jul  1 13:42
/etc/systemd/system/multi-user.target.wants/origin-node.service ->
*/etc/systemd/system/origin-node.service*

# cat /etc/systemd/system/origin-node.service
[Unit]
Description=OpenShift Node
After=docker.service
After=chronyd.service
After=ntpd.service
Wants=openvswitch.service
After=ovsdb-server.service
After=ovs-vswitchd.service
Wants=docker.service
Documentation=https://github.com/openshift/origin
Wants=dnsmasq.service
After=dnsmasq.service

[Service]
Type=notify
EnvironmentFile=/etc/sysconfig/origin-node
Environment=GOTRACEBACK=crash
ExecStartPre=/usr/bin/cp /etc/origin/node/node-dnsmasq.conf /etc/dnsmasq.d/
ExecStartPre=/usr/bin/dbus-send --system --dest=uk.org.thekelleys.dnsmasq
/uk/org/thekelleys/dnsmasq uk.org.thekelleys.SetDomainServers
array:string:/in-addr.arpa/127.0.0.1,/cluster.local/127.0.0.1
ExecStopPost=/usr/bin/rm /etc/dnsmasq.d/node-dnsmasq.conf
ExecStopPost=/usr/bin/dbus-send --system --dest=uk.org.thekelleys.dnsmasq
/uk/org/thekelleys/dnsmasq uk.org.thekelleys.SetDomainServers array:string:
ExecStart=/usr/bin/openshift start node  --config=${CONFIG_FILE} $OPTIONS
LimitNOFILE=65536
LimitCORE=infinity
WorkingDirectory=/var/lib/origin/
SyslogIdentifier=origin-node
Restart=always
RestartSec=5s
TimeoutStartSec=300
OOMScoreAdjust=-999

[Install]
WantedBy=multi-user.target


After remove it, the link points to where I expect being the right unit
file:


# rm -f /etc/systemd/system/origin-node.service

# systemctl disable origin-node
Removed symlink
/etc/systemd/system/multi-user.target.wants/origin-node.service.

# systemctl enable origin-node
Created symlink from
/etc/systemd/system/multi-user.target.wants/origin-node.service to
/usr/lib/systemd/system/origin-node.service.

*# systemctl restart origin-node*

# ps ax -o pid,nice,comm|grep openshift
  4994   0 openshift
  5036  -5 openshift


The question now is: where /etc/systemd/system/origin-node.service comes
from?

--
Mateus Caruccio / Master of Puppets
GetupCloud.com
We make the infrastructure invisible
Gartner Cool Vendor 2017

2018-07-01 8:06 GMT-03:00 Tobias Florek :

> Hi!
>
> > ExecStart=nice -n -5 /usr/bin/openshift start node [...]
>
> That won't work. You need the full path to the executable in systemd
> units.
>
> Cheers,
>  Tobias Florek
>
> ___
> dev mailing list
> dev@lists.openshift.redhat.com
> http://lists.openshift.redhat.com/openshiftmm/listinfo/dev
>
>
___
dev mailing list
dev@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/dev
___
dev mailing list
dev@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/dev


Re: Kubelet/node nice level

2018-07-01 Thread Mateus Caruccio
Yep, I copy/paste from an old buffer. It's /bin/nice already. Same results.

Anyway, I believe have found the reason. Looks like
/etc/systemd/system/multi-user.target.wants is linking to the wrong unit
file (or am I editing the wrong one?).

# ls -l /etc/systemd/system/multi-user.target.wants/origin-node.service
lrwxrwxrwx.  1 root root   39 Jul  1 13:42
/etc/systemd/system/multi-user.target.wants/origin-node.service ->
*/etc/systemd/system/origin-node.service*

# cat /etc/systemd/system/origin-node.service
[Unit]
Description=OpenShift Node
After=docker.service
After=chronyd.service
After=ntpd.service
Wants=openvswitch.service
After=ovsdb-server.service
After=ovs-vswitchd.service
Wants=docker.service
Documentation=https://github.com/openshift/origin
Wants=dnsmasq.service
After=dnsmasq.service

[Service]
Type=notify
EnvironmentFile=/etc/sysconfig/origin-node
Environment=GOTRACEBACK=crash
ExecStartPre=/usr/bin/cp /etc/origin/node/node-dnsmasq.conf /etc/dnsmasq.d/
ExecStartPre=/usr/bin/dbus-send --system --dest=uk.org.thekelleys.dnsmasq
/uk/org/thekelleys/dnsmasq uk.org.thekelleys.SetDomainServers
array:string:/in-addr.arpa/127.0.0.1,/cluster.local/127.0.0.1
ExecStopPost=/usr/bin/rm /etc/dnsmasq.d/node-dnsmasq.conf
ExecStopPost=/usr/bin/dbus-send --system --dest=uk.org.thekelleys.dnsmasq
/uk/org/thekelleys/dnsmasq uk.org.thekelleys.SetDomainServers array:string:
ExecStart=/usr/bin/openshift start node  --config=${CONFIG_FILE} $OPTIONS
LimitNOFILE=65536
LimitCORE=infinity
WorkingDirectory=/var/lib/origin/
SyslogIdentifier=origin-node
Restart=always
RestartSec=5s
TimeoutStartSec=300
OOMScoreAdjust=-999

[Install]
WantedBy=multi-user.target


After remove it, the link points to where I expect being the right unit
file:


# rm -f /etc/systemd/system/origin-node.service

# systemctl disable origin-node
Removed symlink
/etc/systemd/system/multi-user.target.wants/origin-node.service.

# systemctl enable origin-node
Created symlink from
/etc/systemd/system/multi-user.target.wants/origin-node.service to
/usr/lib/systemd/system/origin-node.service.

*# systemctl restart origin-node*

# ps ax -o pid,nice,comm|grep openshift
  4994   0 openshift
  5036  -5 openshift


The question now is: where /etc/systemd/system/origin-node.service comes
from?

--
Mateus Caruccio / Master of Puppets
GetupCloud.com
We make the infrastructure invisible
Gartner Cool Vendor 2017

2018-07-01 8:06 GMT-03:00 Tobias Florek :

> Hi!
>
> > ExecStart=nice -n -5 /usr/bin/openshift start node [...]
>
> That won't work. You need the full path to the executable in systemd
> units.
>
> Cheers,
>  Tobias Florek
>
> ___
> dev mailing list
> dev@lists.openshift.redhat.com
> http://lists.openshift.redhat.com/openshiftmm/listinfo/dev
>
>
___
dev mailing list
dev@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/dev


Re: Kubelet/node nice level

2018-07-01 Thread Tobias Florek
Hi!

> ExecStart=nice -n -5 /usr/bin/openshift start node [...]

That won't work. You need the full path to the executable in systemd
units.

Cheers,
 Tobias Florek


signature.asc
Description: signature
___
dev mailing list
dev@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/dev


Re: Kubelet/node nice level

2018-06-30 Thread Mateus Caruccio
Nice doesn't appears on origin-node.service. However I managed to
sucessfully set it on both docker.service and crond.service.
Also I've tried to call it using the nice command with no success:
ExecStart=nice -n -5 /usr/bin/openshift start node
--config=${CONFIG_FILE} $OPTIONS

[root@ip-10-0-53-142 centos]# systemctl daemon-reload
​
[root@ip-10-0-53-142 centos]# systemctl stop origin-node.service
[root@ip-10-0-53-142 centos]# systemctl start origin-node.service
[root@ip-10-0-53-142 centos]# ps afx -o pid,nice,comm|grep openshift
  1744   0 openshift
  1758   0 openshift
 87650   0 openshift
​


--
Mateus Caruccio / Master of Puppets
GetupCloud.com
We make the infrastructure invisible
Gartner Cool Vendor 2017

2018-06-30 17:01 GMT-03:00 Clayton Coleman :

> Maybe double check that systemd sees the Nice parameter with systemctl cat
> origin-node
>
> On Jun 30, 2018, at 3:10 PM, Mateus Caruccio  com> wrote:
>
> [centos@ip-10-0-53-142 ~]$ oc version
> oc v3.9.0+ba7faec-1
> kubernetes v1.9.1+a0ce1bc657
> features: Basic-Auth GSSAPI Kerberos SPNEGO
>
> Server https://api.engine.caruccio.com
> openshift v3.9.0+ba7faec-1
> kubernetes v1.9.1+a0ce1bc657
>
> --
>
> [centos@ip-10-0-53-142 ~]$ sudo grep -v '^#' /etc/sysconfig/origin-node
> /etc/sysconfig/origin-node:OPTIONS=--loglevel=1
> /etc/sysconfig/origin-node:CONFIG_FILE=/etc/origin/node/node-config.yaml
> /etc/sysconfig/origin-node:
> /etc/sysconfig/origin-node:IMAGE_VERSION=v3.9.0
> /etc/sysconfig/origin-node:AWS_ACCESS_KEY_ID=[REDACTED]
> /etc/sysconfig/origin-node:AWS_SECRET_ACCESS_KEY=[REDACTED]
>
> --
>
> [centos@ip-10-0-53-142 ~]$ sudo cat /etc/origin/node/node-config.yaml
> allowDisabledDocker: false
> apiVersion: v1
> dnsBindAddress: 127.0.0.1:53
> dnsRecursiveResolvConf: /etc/origin/node/resolv.conf
> dnsDomain: cluster.local
> dnsIP: 10.0.53.142
> dockerConfig:
>   execHandlerName: ""
> iptablesSyncPeriod: "30s"
> imageConfig:
>   format: openshift/origin-${component}:${version}
>   latest: False
> kind: NodeConfig
> kubeletArguments:
>   cloud-config:
>   - /etc/origin/cloudprovider/aws.conf
>   cloud-provider:
>   - aws
>   image-gc-high-threshold:
>   - '80'
>   image-gc-low-threshold:
>   - '50'
>   image-pull-progress-deadline:
>   - 20m
>   max-pods:
>   - '200'
>   maximum-dead-containers:
>   - '10'
>   maximum-dead-containers-per-container:
>   - '1'
>   minimum-container-ttl-duration:
>   - 30s
>   node-labels:
>   - region=primary
>   - role=master
>   - zone=default
>   - server_name=mateus-master-0
>   pods-per-core:
>   - '20'
> masterClientConnectionOverrides:
>   acceptContentTypes: application/vnd.kubernetes.protobuf,application/json
>   contentType: application/vnd.kubernetes.protobuf
>   burst: 200
>   qps: 100
> masterKubeConfig: system:node:ip-10-0-53-142.us-west-2.compute.internal.
> kubeconfig
> networkPluginName: redhat/openshift-ovs-multitenant
> # networkConfig struct introduced in origin 1.0.6 and OSE 3.0.2 which
> # deprecates networkPluginName above. The two should match.
> networkConfig:
>mtu: 8951
>networkPluginName: redhat/openshift-ovs-multitenant
> nodeName: ip-10-0-53-142.us-west-2.compute.internal
> podManifestConfig:
> servingInfo:
>   bindAddress: 0.0.0.0:10250
>   certFile: server.crt
>   clientCA: ca.crt
>   keyFile: server.key
>   minTLSVersion: VersionTLS12
> volumeDirectory: /var/lib/origin/openshift.local.volumes
> proxyArguments:
>   proxy-mode:
>  - iptables
> volumeConfig:
>   localQuota:
> perFSGroup:
>
> --
>
> [centos@ip-10-0-53-142 ~]$ sudo cat /usr/lib/systemd/system/
> origin-node.service
> [Unit]
> Description=Origin Node
> After=docker.service
> Wants=docker.service
> Documentation=https://github.com/openshift/origin
>
> [Service]
> Type=notify
> EnvironmentFile=/etc/sysconfig/origin-node
> Environment=GOTRACEBACK=crash
> ExecStart=/usr/bin/openshift start node --config=${CONFIG_FILE} $OPTIONS
> LimitNOFILE=65536
> LimitCORE=infinity
> WorkingDirectory=/var/lib/origin/
> SyslogIdentifier=origin-node
> Restart=always
> RestartSec=5s
> OOMScoreAdjust=-999
> Nice = -5
>
> [Install]
> WantedBy=multi-user.target
>
> --
>
> This is the ansible task I'm using:
>
> https://github.com/caruccio/getup-engine-installer/commit/
> 49c28e4cc350856e11b8160f7a315e5fdda0dcce
>
> ---
> - name: Set origin-node niceness
>   ini_file:
> path: /usr/lib/systemd/system/origin-node.service
> section: Service
> option: Nice
> value: -5
> backup: yes
>   tags:
>   - post-install
>
>
> --
> Mateus Caruccio / Master of Puppets
> GetupCloud.com
> We make the infrastructure invisible
> Gartner Cool Vendor 2017
>
> 2018-06-30 15:03 GMT-03:00 Clayton Coleman :
>
>> Which version of openshift and what are your node start settings?
>>
>> On Jun 29, 2018, at 11:10 PM, Mateus Caruccio <
>> mateus.caruc...@getupcloud.com> wrote:
>>
>> Hi. I'm trying to run openshift kubelet with nice 

Re: Kubelet/node nice level

2018-06-30 Thread Clayton Coleman
Maybe double check that systemd sees the Nice parameter with systemctl cat
origin-node

On Jun 30, 2018, at 3:10 PM, Mateus Caruccio 
wrote:

[centos@ip-10-0-53-142 ~]$ oc version
oc v3.9.0+ba7faec-1
kubernetes v1.9.1+a0ce1bc657
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://api.engine.caruccio.com
openshift v3.9.0+ba7faec-1
kubernetes v1.9.1+a0ce1bc657

--

[centos@ip-10-0-53-142 ~]$ sudo grep -v '^#' /etc/sysconfig/origin-node
/etc/sysconfig/origin-node:OPTIONS=--loglevel=1
/etc/sysconfig/origin-node:CONFIG_FILE=/etc/origin/node/node-config.yaml
/etc/sysconfig/origin-node:
/etc/sysconfig/origin-node:IMAGE_VERSION=v3.9.0
/etc/sysconfig/origin-node:AWS_ACCESS_KEY_ID=[REDACTED]
/etc/sysconfig/origin-node:AWS_SECRET_ACCESS_KEY=[REDACTED]

--

[centos@ip-10-0-53-142 ~]$ sudo cat /etc/origin/node/node-config.yaml
allowDisabledDocker: false
apiVersion: v1
dnsBindAddress: 127.0.0.1:53
dnsRecursiveResolvConf: /etc/origin/node/resolv.conf
dnsDomain: cluster.local
dnsIP: 10.0.53.142
dockerConfig:
  execHandlerName: ""
iptablesSyncPeriod: "30s"
imageConfig:
  format: openshift/origin-${component}:${version}
  latest: False
kind: NodeConfig
kubeletArguments:
  cloud-config:
  - /etc/origin/cloudprovider/aws.conf
  cloud-provider:
  - aws
  image-gc-high-threshold:
  - '80'
  image-gc-low-threshold:
  - '50'
  image-pull-progress-deadline:
  - 20m
  max-pods:
  - '200'
  maximum-dead-containers:
  - '10'
  maximum-dead-containers-per-container:
  - '1'
  minimum-container-ttl-duration:
  - 30s
  node-labels:
  - region=primary
  - role=master
  - zone=default
  - server_name=mateus-master-0
  pods-per-core:
  - '20'
masterClientConnectionOverrides:
  acceptContentTypes: application/vnd.kubernetes.protobuf,application/json
  contentType: application/vnd.kubernetes.protobuf
  burst: 200
  qps: 100
masterKubeConfig: system:node:ip-10-0-53-142.us
-west-2.compute.internal.kubeconfig
networkPluginName: redhat/openshift-ovs-multitenant
# networkConfig struct introduced in origin 1.0.6 and OSE 3.0.2 which
# deprecates networkPluginName above. The two should match.
networkConfig:
   mtu: 8951
   networkPluginName: redhat/openshift-ovs-multitenant
nodeName: ip-10-0-53-142.us-west-2.compute.internal
podManifestConfig:
servingInfo:
  bindAddress: 0.0.0.0:10250
  certFile: server.crt
  clientCA: ca.crt
  keyFile: server.key
  minTLSVersion: VersionTLS12
volumeDirectory: /var/lib/origin/openshift.local.volumes
proxyArguments:
  proxy-mode:
 - iptables
volumeConfig:
  localQuota:
perFSGroup:

--

[centos@ip-10-0-53-142 ~]$ sudo cat
/usr/lib/systemd/system/origin-node.service
[Unit]
Description=Origin Node
After=docker.service
Wants=docker.service
Documentation=https://github.com/openshift/origin

[Service]
Type=notify
EnvironmentFile=/etc/sysconfig/origin-node
Environment=GOTRACEBACK=crash
ExecStart=/usr/bin/openshift start node --config=${CONFIG_FILE} $OPTIONS
LimitNOFILE=65536
LimitCORE=infinity
WorkingDirectory=/var/lib/origin/
SyslogIdentifier=origin-node
Restart=always
RestartSec=5s
OOMScoreAdjust=-999
Nice = -5

[Install]
WantedBy=multi-user.target

--

This is the ansible task I'm using:

https://github.com/caruccio/getup-engine-installer/commit/49c28e4cc350856e11b8160f7a315e5fdda0dcce

---
- name: Set origin-node niceness
  ini_file:
path: /usr/lib/systemd/system/origin-node.service
section: Service
option: Nice
value: -5
backup: yes
  tags:
  - post-install


--
Mateus Caruccio / Master of Puppets
GetupCloud.com
We make the infrastructure invisible
Gartner Cool Vendor 2017

2018-06-30 15:03 GMT-03:00 Clayton Coleman :

> Which version of openshift and what are your node start settings?
>
> On Jun 29, 2018, at 11:10 PM, Mateus Caruccio  com> wrote:
>
> Hi. I'm trying to run openshift kubelet with nice set o -5 but with no
> success.
>
> I've noticed that kubelet is started using syscall.Exec[1], which calls
> execve. The man page of execve[2] states that the new process shall
> inherited nice value from caller.
>
> After adding `Nice=-5` to origin-node unit and reloading both daemon and
> unit, openshift node process still runs with nice=0.
>
> What am I missing?
>
> [1]: https://github.com/openshift/origin/blob/
> 83ac5ae6a7d635ae67b1be438d85c339500fd65b/pkg/cmd/server/
> start/start_node.go#L433
> [2]: https://linux.die.net/man/3/execve
>
> --
> Mateus Caruccio / Master of Puppets
> GetupCloud.com
> We make the infrastructure invisible
> Gartner Cool Vendor 2017
>
> ___
> dev mailing list
> dev@lists.openshift.redhat.com
> http://lists.openshift.redhat.com/openshiftmm/listinfo/dev
>
>
___
dev mailing list
dev@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/dev


Re: Kubelet/node nice level

2018-06-30 Thread Mateus Caruccio
[centos@ip-10-0-53-142 ~]$ oc version
oc v3.9.0+ba7faec-1
kubernetes v1.9.1+a0ce1bc657
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://api.engine.caruccio.com
openshift v3.9.0+ba7faec-1
kubernetes v1.9.1+a0ce1bc657

--

[centos@ip-10-0-53-142 ~]$ sudo grep -v '^#' /etc/sysconfig/origin-node
/etc/sysconfig/origin-node:OPTIONS=--loglevel=1
/etc/sysconfig/origin-node:CONFIG_FILE=/etc/origin/node/node-config.yaml
/etc/sysconfig/origin-node:
/etc/sysconfig/origin-node:IMAGE_VERSION=v3.9.0
/etc/sysconfig/origin-node:AWS_ACCESS_KEY_ID=[REDACTED]
/etc/sysconfig/origin-node:AWS_SECRET_ACCESS_KEY=[REDACTED]

--

[centos@ip-10-0-53-142 ~]$ sudo cat /etc/origin/node/node-config.yaml
allowDisabledDocker: false
apiVersion: v1
dnsBindAddress: 127.0.0.1:53
dnsRecursiveResolvConf: /etc/origin/node/resolv.conf
dnsDomain: cluster.local
dnsIP: 10.0.53.142
dockerConfig:
  execHandlerName: ""
iptablesSyncPeriod: "30s"
imageConfig:
  format: openshift/origin-${component}:${version}
  latest: False
kind: NodeConfig
kubeletArguments:
  cloud-config:
  - /etc/origin/cloudprovider/aws.conf
  cloud-provider:
  - aws
  image-gc-high-threshold:
  - '80'
  image-gc-low-threshold:
  - '50'
  image-pull-progress-deadline:
  - 20m
  max-pods:
  - '200'
  maximum-dead-containers:
  - '10'
  maximum-dead-containers-per-container:
  - '1'
  minimum-container-ttl-duration:
  - 30s
  node-labels:
  - region=primary
  - role=master
  - zone=default
  - server_name=mateus-master-0
  pods-per-core:
  - '20'
masterClientConnectionOverrides:
  acceptContentTypes: application/vnd.kubernetes.protobuf,application/json
  contentType: application/vnd.kubernetes.protobuf
  burst: 200
  qps: 100
masterKubeConfig:
system:node:ip-10-0-53-142.us-west-2.compute.internal.kubeconfig
networkPluginName: redhat/openshift-ovs-multitenant
# networkConfig struct introduced in origin 1.0.6 and OSE 3.0.2 which
# deprecates networkPluginName above. The two should match.
networkConfig:
   mtu: 8951
   networkPluginName: redhat/openshift-ovs-multitenant
nodeName: ip-10-0-53-142.us-west-2.compute.internal
podManifestConfig:
servingInfo:
  bindAddress: 0.0.0.0:10250
  certFile: server.crt
  clientCA: ca.crt
  keyFile: server.key
  minTLSVersion: VersionTLS12
volumeDirectory: /var/lib/origin/openshift.local.volumes
proxyArguments:
  proxy-mode:
 - iptables
volumeConfig:
  localQuota:
perFSGroup:

--

[centos@ip-10-0-53-142 ~]$ sudo cat
/usr/lib/systemd/system/origin-node.service
[Unit]
Description=Origin Node
After=docker.service
Wants=docker.service
Documentation=https://github.com/openshift/origin

[Service]
Type=notify
EnvironmentFile=/etc/sysconfig/origin-node
Environment=GOTRACEBACK=crash
ExecStart=/usr/bin/openshift start node --config=${CONFIG_FILE} $OPTIONS
LimitNOFILE=65536
LimitCORE=infinity
WorkingDirectory=/var/lib/origin/
SyslogIdentifier=origin-node
Restart=always
RestartSec=5s
OOMScoreAdjust=-999
Nice = -5

[Install]
WantedBy=multi-user.target

--

This is the ansible task I'm using:

https://github.com/caruccio/getup-engine-installer/commit/49c28e4cc350856e11b8160f7a315e5fdda0dcce

---
- name: Set origin-node niceness
  ini_file:
path: /usr/lib/systemd/system/origin-node.service
section: Service
option: Nice
value: -5
backup: yes
  tags:
  - post-install


--
Mateus Caruccio / Master of Puppets
GetupCloud.com
We make the infrastructure invisible
Gartner Cool Vendor 2017

2018-06-30 15:03 GMT-03:00 Clayton Coleman :

> Which version of openshift and what are your node start settings?
>
> On Jun 29, 2018, at 11:10 PM, Mateus Caruccio  com> wrote:
>
> Hi. I'm trying to run openshift kubelet with nice set o -5 but with no
> success.
>
> I've noticed that kubelet is started using syscall.Exec[1], which calls
> execve. The man page of execve[2] states that the new process shall
> inherited nice value from caller.
>
> After adding `Nice=-5` to origin-node unit and reloading both daemon and
> unit, openshift node process still runs with nice=0.
>
> What am I missing?
>
> [1]: https://github.com/openshift/origin/blob/
> 83ac5ae6a7d635ae67b1be438d85c339500fd65b/pkg/cmd/server/
> start/start_node.go#L433
> [2]: https://linux.die.net/man/3/execve
>
> --
> Mateus Caruccio / Master of Puppets
> GetupCloud.com
> We make the infrastructure invisible
> Gartner Cool Vendor 2017
>
> ___
> dev mailing list
> dev@lists.openshift.redhat.com
> http://lists.openshift.redhat.com/openshiftmm/listinfo/dev
>
>
___
dev mailing list
dev@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/dev


Kubelet/node nice level

2018-06-29 Thread Mateus Caruccio
Hi. I'm trying to run openshift kubelet with nice set o -5 but with no
success.

I've noticed that kubelet is started using syscall.Exec[1], which calls
execve. The man page of execve[2] states that the new process shall
inherited nice value from caller.

After adding `Nice=-5` to origin-node unit and reloading both daemon and
unit, openshift node process still runs with nice=0.

What am I missing?

[1]:
https://github.com/openshift/origin/blob/83ac5ae6a7d635ae67b1be438d85c339500fd65b/pkg/cmd/server/start/start_node.go#L433
[2]: https://linux.die.net/man/3/execve

--
Mateus Caruccio / Master of Puppets
GetupCloud.com
We make the infrastructure invisible
Gartner Cool Vendor 2017
___
dev mailing list
dev@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/dev