DevStack Logging and Service Names¶
NOTE: This spec is still a work in progress, it is being posted to get some early feedback on scope and ordering of steps.
DevStack is in need of updates to its log file handling and service naming, both of which were appropriate for the originalscreen-based installs with a handful of services.
This spec contains both the log file reform as well as the service name updates as they are a bit intertwined so some steps will address them both as necessary.
DevStack’s logging configuration was initially based on saving
as part of the development of not using
screen the logging was kept compatible
and it became obvious that the original special case was not required.
Historically DevStack has used abbreviated service names for identifying services to enable, naming log files and as window names in screen. OpenStack has grown to the point that the abbreviated names are too confusing and non-obvious, especially for the not-so-recently renamed Neutron.
These topics were covered at the Paris summit, notes in the OpenStack Etherpad.
Update DevStack’s logging configuration to set a logging directory rather than parsing
that out of a filename. Ultimately eliminate the use of
LOGDIRas the primary setting in local.conf for log locations, default to
LOGFILENAMEis not set.
Continue to use
LOGFILENAMEif set, if
LOGFILEis not set continue to set it to $(dirname
LOGDIRinstead. For a compatibility period leave symlinks in the old screen log locations.
screen-from the beginning of the service log filenames
Service log files will implicitly be renamed as the service names change (see above)
Grenade should work seamlessly as it lets both DevStack runs do their thing and
devstack-gate contains all of the specifics that need updating fro Grenade jobs.
Use fully-formed names for service names (like ceilometer does today):
glance-registry, etc. The names will use the project name, as used in
followed by ‘-’ and a descriptive name of the service.
Also allow multiple instances of service names, as in running the fake hypervisor has
a number of
nova-cpu instances. Append an instance counter to the name similar to
n-cpu-N is currently handled. Optionally use a ‘:’ as the separator between the
service name and instance number. This will be used in the log file name so it must be
There needs to be a mapping of the old abbreviated names to the full names to handle backward compatibility.
This will make
ENABLED_SERVICESvery long by default and harder to scan visually. Is this a real concern? With the recent forced update to using Bash 4 we could use an associative array to do the mapping and the enabled list in a single shot.
(Note: We just started doing something in Grenade to handle mapping abbreviated service names-> processes (https://review.openstack.org/#/c/113405/5/check-sanity) This would help move that logic into DevStack and also help provide other mappings (ie, service name -> database name))
Log filenames will change, but there is more on that front (see below).
Grenade will need to be updated before the backward compatibility can be removed.
- Primary assignee:
Logging: change the log file names in
SCREEN_LOGDIRso the actual files with the timestamp in the names end with the timestamp:
screen-c-sch.2014-12-10-193405.log becomes screen-c-sch.log.2014-12-10-193405
devstack-gateto look for
*.lograther than symlinks to select the log files it copies out of
Logging: switch from
LOGDIRfor log tests. This will move the log files out of
SCREEN_LOGDIRso leave backward-compatibility symlinks in the old locations. (This is the reason for #2 as
devstack-gateselects the files top copy by the symlink attribute.)
Logging: follow up in
devstack-gateto use LOGDIR directly and copy log files from there.
Logging: after a time, remove the symlinks from
Services: change how multiple instances of services are handled, currently in
stop_nova_compute(). If the separator is changed the config filenames will also change, reconsider if parsing is necessary.
Services: build the new service naming structures and compatibility.
Services and Logging: switch logging to use the new service names and ensure nothing gets lost in
The only dependencies are in the order of changes required in multiple projects.