Umm, so routes.json seems to be a common file for all apps which might create contention ...should I use another lock file for them or am I reading things wrong?


--
Lokesh

-------- Original message --------
From: Jhon Honce <notifications@github.com> 
Date: 02/05/2014  17:23  (GMT-05:00) 
To: openshift/origin-server <origin-server@noreply.github.com> 
Cc: Lokesh Mandvekar <lsm5@redhat.com> 
Subject: Re: [origin-server] card #324 add user/gear cleanup script to node-util (#4665) 
 
In node-util/sbin/oo-admin-gear:

> +
> +puts 'Deleting stale user home dir...'
> +user_home_delete = %x[rm -rf /var/lib/openshift/#{uuid}]
> +puts user_home_delete if $?.exitstatus != 0
> +
> +puts 'Deleting gear pam limits files...'
> +user_pam_limits_delete = %x[rm -f /etc/security/limits.d/*-#{uuid}.conf]
> +puts user_pam_limits_delete if $?.exitstatus != 0
> +
> +with_cgroups_lock do
> +    puts 'Deleting cgroup info...'
> +    user_cgconfig_delete = %x[sed -i '/#{uuid}/d' /etc/cgconfig.conf]
> +    puts user_cgconfig_delete if $?.exitstatus != 0
> +
> +    puts 'Deleting stale info from routes.json...'
> +    websocket_info_delete = %x[sed -i 's/"#{app}-[a-zA-Z0-9\.]*":{"endpoints":\["[0-9\.:]*"\],"limits":{"connections":[0-9]*,"bandwidth":[0-9]*}}//' /var/lib/openshift/.httpd.d/routes.json]
The cgroups lock isn't going to work for updating the routes.json. Only the cgconfig.conf file.

—
Reply to this email directly or view it on GitHub.