Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ graft templates
graft tests
graft tools
graft udev
graft upstart
prune build
prune dist
prune .tox
Expand Down
2 changes: 1 addition & 1 deletion cloudinit/analyze/show.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def parse_epoch_as_float(self):
def dist_check_timestamp():
"""
Determine which init system a particular linux distro is using.
Each init system (systemd, upstart, etc) has a different way of
Each init system (systemd, etc) has a different way of
providing timestamps.

:return: timestamps of kernelboot, kernelendboot, and cloud-initstart
Expand Down
30 changes: 1 addition & 29 deletions cloudinit/cmd/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,31 +337,6 @@ def main_init(name, args):
if mode == sources.DSMODE_NETWORK:
existing = "trust"
sys.stderr.write("%s\n" % (netinfo.debug_info()))
LOG.debug(
"Checking to see if files that we need already"
" exist from a previous run that would allow us"
" to stop early."
)
# no-net is written by upstart cloud-init-nonet when network failed
# to come up
stop_files = [
os.path.join(path_helper.get_cpath("data"), "no-net"),
]
existing_files = []
for fn in stop_files:
if os.path.isfile(fn):
existing_files.append(fn)

if existing_files:
LOG.debug(
"[%s] Exiting. stop file %s existed", mode, existing_files
)
return (None, [])
else:
LOG.debug(
"Execution continuing, no previous run detected that"
" would allow us to stop early."
)
else:
existing = "check"
mcfg = util.get_cfg_option_bool(init.cfg, "manual_cache_clean", False)
Expand All @@ -375,8 +350,6 @@ def main_init(name, args):
existing = "trust"

init.purge_cache()
# Delete the no-net file as well
util.del_file(os.path.join(path_helper.get_cpath("data"), "no-net"))

# Stage 5
bring_up_interfaces = _should_bring_up_interfaces(init, args)
Expand All @@ -394,8 +367,7 @@ def main_init(name, args):
except sources.DataSourceNotFoundException:
# In the case of 'cloud-init init' without '--local' it is a bit
# more likely that the user would consider it failure if nothing was
# found. When using upstart it will also mentions job failure
# in console log if exit code is != 0.
# found.
if mode == sources.DSMODE_LOCAL:
LOG.debug("No local datasource found")
else:
Expand Down
1 change: 0 additions & 1 deletion cloudinit/handlers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"#include-once": "text/x-include-once-url",
"#!": "text/x-shellscript",
"#cloud-config": "text/cloud-config",
"#upstart-job": "text/upstart-job",
"#part-handler": "text/part-handler",
"#cloud-boothook": "text/cloud-boothook",
"#cloud-config-archive": "text/cloud-config-archive",
Expand Down
107 changes: 0 additions & 107 deletions cloudinit/handlers/upstart_job.py

This file was deleted.

1 change: 0 additions & 1 deletion cloudinit/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,6 @@ def __init__(self, path_cfgs, ds=None):
self.run_dir = path_cfgs.get("run_dir", "/run/cloud-init")
self.instance_link = os.path.join(self.cloud_dir, "instance")
self.boot_finished = os.path.join(self.instance_link, "boot-finished")
self.upstart_conf_d = path_cfgs.get("upstart_dir")
self.seed_dir = os.path.join(self.cloud_dir, "seed")
# This one isn't joined, since it should just be read-only
template_dir = path_cfgs.get("templates_dir", "/etc/cloud/templates/")
Expand Down
2 changes: 0 additions & 2 deletions cloudinit/stages.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
from cloudinit.handlers.shell_script_by_frequency import (
ShellScriptByFreqPartHandler,
)
from cloudinit.handlers.upstart_job import UpstartJobPartHandler
from cloudinit.net import cmdline
from cloudinit.reporting import events
from cloudinit.settings import (
Expand Down Expand Up @@ -527,7 +526,6 @@ def _default_handlers(self, opts=None):
ShellScriptByFreqPartHandler(PER_INSTANCE, **opts),
ShellScriptByFreqPartHandler(PER_ONCE, **opts),
BootHookPartHandler(**opts),
UpstartJobPartHandler(**opts),
]
opts.update(
{"sub_handlers": [cloudconfig_handler, shellscript_handler]}
Expand Down
7 changes: 1 addition & 6 deletions cloudinit/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ def multi_log(
# This will result in duplicate stderr and stdout messages if
# stderr was True.
#
# even though upstart or systemd might have set up output to go to
# even though systemd might have set up output to go to
# /dev/console, the user may have configured elsewhere via
# cloud-config 'output'. If there is /dev/console, messages will
# still get there.
Expand Down Expand Up @@ -2220,10 +2220,6 @@ def _is_container_systemd():
return _cmd_exits_zero(["systemd-detect-virt", "--quiet", "--container"])


def _is_container_upstart():
return _cmd_exits_zero(["running-in-container"])


def _is_container_old_lxc():
return _cmd_exits_zero(["lxc-is-container"])

Expand All @@ -2246,7 +2242,6 @@ def is_container():
checks = (
_is_container_systemd,
_is_container_freebsd,
_is_container_upstart,
_is_container_old_lxc,
)

Expand Down
3 changes: 0 additions & 3 deletions config/cloud.cfg.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,6 @@ cloud_init_modules:
# The modules that run in the 'config' stage
cloud_config_modules:
{% if variant in ["ubuntu", "unknown", "debian"] %}
# Emit the cloud config ready event
# this can be used by upstart jobs for 'start on cloud-config'.
- snap
{% endif %}
{% if variant not in ["photon"] %}
Expand Down Expand Up @@ -203,7 +201,6 @@ system_info:
paths:
cloud_dir: /var/lib/cloud/
templates_dir: /etc/cloud/templates/
upstart_dir: /etc/init/
package_mirrors:
- arches: [i386, amd64]
failsafe:
Expand Down
7 changes: 2 additions & 5 deletions doc/examples/cloud-config-archive.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,5 @@
multi line payload
here
-
type: text/upstart-job
filename: my-upstart.conf
content: |
whats this, yo?

type: text/cloud-config
content: '#cloud-config\n\n password: gocubs'
11 changes: 0 additions & 11 deletions doc/examples/cloud-config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -455,17 +455,6 @@ ssh_pwauth: True
# default is False
manual_cache_clean: False

# When cloud-init is finished running including having run
# cloud_init_modules, then it will run this command. The default
# is to emit an upstart signal as shown below. If the value is a
# list, it will be passed to Popen. If it is a string, it will be
# invoked through 'sh -c'.
#
# default value:
# cc_ready_cmd: [ initctl, emit, cloud-config, CLOUD_CFG=/var/lib/instance//cloud-config.txt ]
# example:
# cc_ready_cmd: [ sh, -c, 'echo HI MOM > /tmp/file' ]

## configure interaction with ssh server
# ssh_svcname: ssh
# set the name of the option to 'service restart'
Expand Down
12 changes: 0 additions & 12 deletions doc/examples/upstart-cloud-config.txt

This file was deleted.

12 changes: 0 additions & 12 deletions doc/examples/upstart-rclocal.txt

This file was deleted.

2 changes: 0 additions & 2 deletions doc/rtd/topics/analyze.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ execution.
00.00000s (modules-final/config-chef)
00.00000s (modules-config/config-snap_config)
00.00000s (modules-config/config-ntp)
00.00000s (modules-config/config-emit_upstart)
00.00000s (modules-config/config-disable-ec2-metadata)
00.00000s (init-network/setup-datasource)

Expand Down Expand Up @@ -138,7 +137,6 @@ The following is an abbreviated example of the show output:
Finished stage: (init-network) 02.72100 seconds

Starting stage: modules-config
|`->config-emit_upstart ran successfully @15.43100s +00.00000s
|`->config-snap ran successfully @15.43100s +00.00100s
...
|`->config-runcmd ran successfully @16.22300s +00.00100s
Expand Down
1 change: 0 additions & 1 deletion doc/rtd/topics/debugging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ subcommands default to reading /var/log/cloud-init.log.
The time the event takes is printed after the "+" character.

Starting stage: modules-config
|`->config-emit_upstart ran successfully @05.47600s +00.00100s
|`->config-snap_config ran successfully @05.47700s +00.00100s
|`->config-ssh-import-id ran successfully @05.47800s +00.00200s
|`->config-locale ran successfully @05.48000s +00.00100s
Expand Down
10 changes: 0 additions & 10 deletions doc/rtd/topics/format.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ Supported content-types are listed from the cloud-init subcommand make-mime:
cloud-config-jsonp
jinja2
part-handler
upstart-job
x-include-once-url
x-include-url
x-shellscript
Expand Down Expand Up @@ -203,15 +202,6 @@ Example

Also this `blog`_ post offers another example for more advanced usage.

Upstart Job
===========

Content is placed into a file in ``/etc/init``, and will be consumed by upstart
as any other upstart job.

Begins with: ``#upstart-job`` or ``Content-Type: text/upstart-job`` when using
a MIME archive.

Disabling User-Data
===================

Expand Down
1 change: 0 additions & 1 deletion doc/rtd/topics/instancedata.rst
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,6 @@ EC2 instance:
"[handler_cloudLogHandler]\nclass=handlers.SysLogHandler\nlevel=DEBUG\nformatter=simpleFormatter\nargs=(\"/dev/log\", handlers.SysLogHandler.LOG_USER)\n"
],
"cloud_config_modules": [
"emit_upstart",
"snap",
"ssh-import-id",
"locale",
Expand Down
6 changes: 0 additions & 6 deletions doc/userdata.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,6 @@ finds. However, certain types of user-data are handled specially.
This content is "cloud-config" data. See the examples for a
commented example of supported config formats.

* Upstart Job
begins with #upstart-job or Content-Type: text/upstart-job

Content is placed into a file in /etc/init, and will be consumed
by upstart as any other upstart job.

* Cloud Boothook
begins with #cloud-boothook or Content-Type: text/cloud-boothook

Expand Down
2 changes: 0 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ def render_tmpl(template, mode=None):
for f in glob("systemd/*")
if is_f(f) and is_generator(f)
],
"upstart": [f for f in glob("upstart/*") if is_f(f)],
}
INITSYS_ROOTS = {
"sysvinit": "etc/rc.d/init.d",
Expand All @@ -169,7 +168,6 @@ def render_tmpl(template, mode=None):
"systemd.generators": pkg_config_read(
"systemd", "systemdsystemgeneratordir"
),
"upstart": "etc/init/",
}
INITSYS_TYPES = sorted([f.partition(".")[0] for f in INITSYS_ROOTS.keys()])

Expand Down
Loading