swift-smf-method revision 2801
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync# Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync# Licensed under the Apache License, Version 2.0 (the "License"); you may
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync# not use this file except in compliance with the License. You may obtain
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync# a copy of the License at
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync# Unless required by applicable law or agreed to in writing, software
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync# License for the specific language governing permissions and limitations
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync# under the License.
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync "account-reaper": ["account", "container", "object"],
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync # All the Swift services do essentially the same thing, so there's no need
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync # to have different method executables. Just look at the FMRI and run the
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync # appropriate executable from /usr/lib/swift.
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync # Try to find a config file that matches the executable name (minus the
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync # leading "swift-". If that fails, try using the -server config file.
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync cfgfile = "/etc/swift/%s.conf" % exepath.split("-", 1)[1]
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync cfgfile = "/etc/swift/%s-server.conf" % exepath.split("-")[1]
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync smf_include.smf_method_exit(smf_include.SMF_EXIT_ERR_CONFIG,
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync for ring in rings.get(exepath.split("-", 1)[1], ()):
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync print >> sys.stderr, "Missing ring(s): " + ", ".join(missing_rings)
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync smf_include.smf_method_exit(smf_include.SMF_EXIT_ERR_CONFIG,
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync # This is the default recon_cache_path (from the config files) as well as
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync # the default run_dir (from the code).