Age | Commit message (Collapse) | Author |
|
This adds some function to the generator to maintain the presense of a
flag file '/run/cloud-init/enabled' indicating that cloud-init is enabled.
Then, only run the dhclient hooks if on Azure and cloud-init is enabled.
The test for is_azure currently only checks to see that the board vendor
is Microsoft, not actually that we are on azure. Running should not be
harmful anywhere, other than slowing down dhclient.
The value of this additional code is that then dhclient having run
does not task the system with the load of cloud-init.
Additionally, some changes to config are done here.
* rename 'dhclient_leases' to 'dhclient_lease_file'
* move that to the datasource config (datasource/Azure/dhclient_lease_file)
Also, it removes the config in config/cloud.cfg that set agent_command
to __builtin__. This means that by default cloud-init still needs
the agent installed. The suggested follow-on improvement is to
use __builtin__ if there is no walinux-agent installed.
|
|
It is more efficient and cross-distribution safe to use the hooks function
from dhclient to obtain the Azure endpoint server (DHCP option 245).
This is done by providing shell scritps that are called by the hooks
infrastructure of both dhclient and NetworkManager. The hooks then
invoke 'cloud-init dhclient-hook' that maintains json data
with the dhclient options in
/run/cloud-init/dhclient.hooks/<interface>.json .
The azure helper then pulls the value from
/run/cloud-init/dhclient.hooks/<interface>.json file(s). If that file does
not exist or the value is not present, it will then fall back to the
original method of scraping the dhcp client lease file.
|
|
commit 48ec60ae changed over several tools to use X.Y.Z-XXX-gHASH
but missed tools/read-version. The end result was that
check_version failed.
|
|
Some older versions of git (Centos 6) do not have --format=tar.gz.
To work around this, create a .tar file and then compress it.
|
|
Even if there is a .git directory, we can't use git if there
is no git executable in the path. In that case just fall back
to the cloud-init version.
|
|
For upstream version directly use the output of git-describe
(X.Y.Z-number.gHASH) rather than rather than changing it to
(X.Y.Z+number.gHASH).
The rpm version does not allow '-' in Version, so we create and use
rpm_upstream_version in the rpm spec file. That is of format:
X.Y.Z+number.gHASH
|
|
Modification of the tarball became problematic, as it meant that
any tool extracting source would find the orig source tarball different.
I found this unusable when trying to use 'gbp buildpackage'.
Other changes here are to better support using python3 or python2
for the build. Makefile will try to call the right python version
and can be told which python to use.
read-version: by adding 'tiny_p' and avoiding the import of
cloudinit.util, we need less dependencies to run this.
|
|
upstream snapshots are versioned in the format 'X.Y.Z+<distance>.g<commit>'
where X.Y.Z are major, minor, and micro. Distance is number of commits
since last annotated tag, and commit is the git commit.
bddeb and brpm will now create and use the "upstream version" like above.
Things changed here:
- tools/make-tarball
update cloudinit/version.py to contain the full version
support --output
support '--long' to always create the long format version string.
- bddeb:
- use quilt debian source format
- use read-version and long version in changelog.
- brpm:
- change to use read-version and upstream long version in the spec.
- flake8 changes
- tools/read-version
- read version from git or from cloudinit/version.
- provide --json output with more nicely formed data.
|
|
- Update HACKING.rst to include git instructions
- update MANIFEST.in and .gitignore to ignore git-related things
- replaced tarball generation scripts with git-based script
- have the spec files correctly identify themselves as cheetah templates
- make brpm work with git
|
|
|
|
|
|
Now if you log in with unsupported locale, you'll see:
The unknown environment variables are:
LC_CTYPE=en_GB.utf-8 LC_MESSAGES=en_GB.utf-8 LC_ALL=en_GB.utf-8
LP: #1558069
|
|
make check fails in a trusty sbuild due to different rules on older pep8.
Fix formatting to pass in older and newer pep8.
|
|
Update make check target to run pep8 and run pyflakes or pyflakes3
depending on the value of 'PYVER'. This way the python3 build
environment does not need python2 and vice versa.
Also have make check run the 'yaml' test.
tox: have tox run pep8 in the pyflakes
|
|
Now we can run make check to assess pep8, pyflakes for python2 or 3
And execute unittests via nosetests (2 and 3).
|
|
|
|
|
|
|
|
painful, and not perfect, but at this point the output builds
on a vivid system python2 (bddeb --python2) or python3.
* remove use of cheetah by bddeb in favor of builtin renderer
* add '--python2' flag to bddeb and knowledge of python 2 and python3
package names.
* read-dependencies can now read test-requirements also.
* differenciate from build-requirements and runtime requirements.
|
|
|
|
--ignore was being called with ',E121,E...' rather than
'E121,E...'.
that resulted in odd behavior, missing the pep8 errors that are fixed
here.
|
|
this was broken previously when user-data and vender-data were
brought together.
|
|
|
|
|
|
|
|
(with pkg).
|
|
|
|
This just removes comments '# pylint:' things and other code
remnents of pylint.
|
|
Fixed all complaints from running "make pep8". Also version locked
pep8 in test-requirements.txt to ensure that pep8 requirements don't
change without an explicit commit.
|
|
get copied per default. Packaging will take care of installing this
configfile on the BSD platform.
|
|
|
|
|
|
the python2.7 binary. This defaults to 2.7, which is fine.
|
|
ofcourse already was good) and FreeBSD (which realy likes /usr/local
for this).
|
|
|
|
|
|
works.
|
|
information, so install it.
|
|
|
|
proper port is created.
|
|
if you have UNCOMMITTED=1 in environment then the tree will
contain uncommitted changes.
|
|
new pylint in trusty complains about '_' variables if we don't do this.
This seems to be ok in older versions of pylint also.
|
|
tools/run-pep8 wasn't checking all python files.
tools/run-pylint wasnt checking bin/cloud-init
fixed resultant pep8 issues after finding them.
|
|
This just does python rewrites of these tools that were shell or sed or
grep. Clearly the user of cloud-init has python, but it turns out that
getting sane versions of sed or grep on different unixes is less than
simple.
|
|
|
|
|
|
|
|
There are just some cleanups here, and use of simply 'sed' rather than
grep and cut. The motivation is to support running with non gnu
'grep' that doesn't have -P.
|
|
Exeptions were being swallowed completely and no way to even see them
other than log.
|
|
There were problems with these tools if the path had a space. This should
make these tools safe. There are others that still have problems.
|