Commit Graph

303 Commits

Author SHA1 Message Date
Andreas Jaeger 797016c54b Retire repository
Fuel (from openstack namespace) and fuel-ccp (in x namespace)
repositories are unused and ready to retire.

This change removes all content from the repository and adds the usual
README file to point out that the repository is retired following the
process from
https://docs.openstack.org/infra/manual/drivers.html#retiring-a-project

See also
http://lists.openstack.org/pipermail/openstack-discuss/2019-December/011647.html

Depends-On: https://review.opendev.org/699362
Change-Id: Icc6a810696788e65e9afd8be691400d4d39de313
2019-12-18 09:38:51 +01:00
Jenkins 92baf4b2d5 Merge "Replaces yaml.load() with yaml.safe_load() for fuel-agent" 2017-04-25 13:22:00 +00:00
Jenkins 18b834e52c Merge "Use new Ironic's heartbeat API" 2017-04-25 11:52:05 +00:00
gengchc2 31c2a87e61 Replaces yaml.load() with yaml.safe_load() for fuel-agent
Yaml.load() return Python object may be dangerous if you receive
a YAML document from an untrusted source such as the Internet.
The function yaml.safe_load() limits this ability to simple Python
objects like integers or lists.

Reference:
https://security.openstack.org/guidelines/dg_avoid-dangerous-input-parsing-libraries.html

Change-Id: I5fb95063402e5adffeee0c2ead7adfd44eb76179
2017-03-10 01:08:02 +00:00
Georgy Kibardin b9842ce714 Do not use separate partition for cloudinit configuration
In our usecases the separate partition is not needed. It is enough just
to put cloudinit configuration into the root filesystem.
This also allows to avoid a race condition which sometimes happens: some
process deletes the folder in tmp where the configuration partition is
mounted resulting in cloudinit failure to read its configuration.

Change-Id: Ib3efb4f517a5cf86dbf91ee53ac00108d4624dcd
Closes-Bug: #1652002
2017-02-21 09:01:12 +00:00
azvyagintsev 6f6fd2fa42 Disable Recommends and Suggests packages
Disable Recommends and Suggests package installs,
  inside Ubuntu target-image

Change-Id: Ie8a450a960b9b00cd4d2c0545a19678baed147d6
Co-Authored-By: Ivan Suzdal <isuzdal@mirantis.com>
Closes-Bug: 1664152
2017-02-13 18:56:39 +02:00
Georgy Kibardin 5877315c7f Configure mcollective identity in startup scripts
As a part of handing over control over mcollective from nailgun agent to
startup scripts lets get rid of of nodiscover file flag and perform
mcollective configuration and start

Change-Id: Ia2f984570b38642b1090f6483ed3fa78958550c5
Partial-Bug: #1585671
2017-02-09 14:33:48 +00:00
gecong1973 675eb6abaf Using sys.exit(main()) instead of main()
As we known, Exceptions are raised by the sys.exit() function.
When they are not handled, no stack traceback is printed in the Python interpreter.

In this patch we have known main() got return values(eg:0, 1), but it can't
specifies exit status when terminate the main thread by unusing sys.exit().
So when using sys.exit(main()) instead of main() may be more readable and
reasonable.

Change-Id: I6b472e0eb2fceb49bb506785f5188e023e1d3968
2016-12-28 14:35:04 +08:00
Jenkins 8fb0612f0b Merge "Use assertIsNone(...) instead of assertEqual(None, ...)" 2016-12-23 09:16:32 +00:00
Evgeny L d9f9f377e4 Allow fs creation if mountpoint is not specified
Such services as Swift-storage require partition with file
system without mountpoints, currently fuel-agent prevents
to do that.

Change-Id: Id9e90f81098de3736e0d9b1ca82e434122efd4e8
Closes-bug: #1650622
2016-12-19 18:30:36 +00:00
Cady_Chen 9e1e030c98 Use assertIsNone(...) instead of assertEqual(None, ...)
Refer to:http://docs.openstack.org/developer/hacking/#unit-tests-and-assertraises

[H203] Use assertIs(Not)None to check for None (off by default) Unit
test assertions tend to give better messages for more specific assertions.
As a result, assertIsNone(...) is preferred over assertEqual(None, ...)
and assertIs(None, ...)

Change-Id: I9246fac952c59d3ddc1458c16c53fc988ac095d3
2016-12-20 01:33:05 +08:00
Jenkins 766969615a Merge "Fix umount fuse control filesystem error" 2016-11-22 09:56:28 +00:00
Sergii Golovatiuk fa49edcdae Disable cloud-init network auto configuration
The previos implementation doesn't fix the problem. Cloud-init
creates /etc/network/interfaces.d/50-cloud-init.cfg which prevents
to set static IP.

Change-Id: I49d09dd37403a843adfe34be156e5e265b0f3e08
Signed-off-by: Sergii Golovatiuk <sgolovatiuk@mirantis.com>
2016-11-19 14:57:17 +01:00
Sergii Golovatiuk fee38d0cd9 Revert "Disable cloud-init network auto configuration"
The directory /etc/cloud/cloud.cfg.d/ doesn't exist. Thus fuel-bootstrap fails as it cannot create file that should be inside of that directory.

Closes-Bug: 1643139
This reverts commit b2be687081.

Change-Id: Ie2bef3a83fb02bf7fe9634ede66998c5cf217f20
2016-11-19 13:52:17 +00:00
Sergii Golovatiuk b2be687081 Disable cloud-init network auto configuration
Change-Id: I58af5ded1e852099a358357adbcbc1f46063bc4f
Signed-off-by: Sergii Golovatiuk <sgolovatiuk@mirantis.com>
2016-11-18 12:36:00 +01:00
Sergii Golovatiuk 51d3078157 Revert "Disable cloud-init network auto configuration"
This fix doesn't fix the problem. I still see 50-cloud-init.cfg in /etc/network/interfaces.d/

This reverts commit faa9de1780.

Change-Id: I93a7fa29ae932b0020a4dad17e580808ee3fb117
Signed-off-by: Sergii Golovatiuk <sgolovatiuk@mirantis.com>
2016-11-18 12:35:29 +01:00
Wei Hui 01d7633e87 Fix umount fuse control filesystem error
In fuel-agent.log, mountpoint -q /tmp/target/sys/fs/fuse/connections
execute failed.

Fuse is a kernel mechanism, it has a fixed pseudo filesystem
location (/sys/fs/fuse/connection) for user. We do not
need to umount it manually, let kernel take care of that.
In our case, nobody cares about fuse in kernel by
/sys/fs/fuse/connection. So we don't need to mount and umount
in chroot.

https://www.kernel.org/doc/Documentation/filesystems/fuse.txt

Change-Id: I0a9af904b2b65af1af96340c0579dedf979464fc
2016-10-19 17:21:33 +08:00
Cao Xuan Hoang 075fc9e257 Fix LOG.warn to LOG.warning
logging.warn is deprecated in Python 3.
https://docs.python.org/3/library/logging.html#logging.warning

Change-Id: I5cef5a11e4802d9244295e2c871a848d14ab7454
2016-09-26 17:49:07 +07:00
Jenkins 850606843a Merge "Change an order of executing cloud-init modules" 2016-09-15 12:21:06 +00:00
Jenkins 62a7800e26 Merge "Configure admin NIC prior the first system boot" 2016-09-14 12:52:52 +00:00
Mikhail 52c4cfd937 Change an order of executing cloud-init modules
Module 'write-files' should be executed after module 'runcmd'

Change-Id: I93360afb05ab739fe3f44b187db41054673caa0e
Closes-Bug: #1543063
2016-09-13 17:34:27 +03:00
Pavlo Shchelokovskyy 8770b8563d Use new Ironic's heartbeat API
also make the callback script more resilent by retrying attempts
to contact Ironic API (hardcoded 50 times).

Change-Id: I269c1b95ee5702ed435df30834e239bd6f6f0582
2016-09-07 11:27:18 +03:00
Jenkins bcbb1ffc1d Merge "TrivialFix: Remove logging import unused" 2016-09-06 18:22:26 +00:00
Jenkins 5acbe3cf7d Merge "Clean imports in code" 2016-09-06 18:17:57 +00:00
Cao Xuan Hoang 00533687d9 Clean imports in code
This patch set modifies lines which are importing objects
instead of modules. As per openstack import guide lines, user should
import modules in a file not objects.

http://docs.openstack.org/developer/hacking/#imports

Change-Id: Icfd86bfff12889e76316da6788db4f7f0c352275
2016-09-06 13:26:32 +07:00
Cao Xuan Hoang 6c206f7838 TrivialFix: Remove logging import unused
This patch removes logging import unused in
fuel_agent/objects/partition/parted.py

Change-Id: Ia14a5a916ea37c626371467b654c44188e0149d0
2016-09-06 13:05:12 +07:00
Pavlo Shchelokovskyy cb77827303 Rename pass_deploy_info to heartbeat
by default, Ironic's API routing now exposes only 'lookup' and 'heartbeat'
vendor passthru methods of drivers as public routes [0].

Rename the vendor passtru method 'pass_deploy_info' of fuel-agent driver
to 'heartbeat' to make it accessable w/o authentication by callback
script.

In the Ocata cycle, this also will be removed and fuel-agent driver
must switch to the root 'heartbeat' API (/v1/heartbeat/node-uuid>).

[0]
https://github.com/openstack/ironic/blob/master/ironic/api/config.py#L37

Change-Id: Ie1dbd8a8aac62034beba88ecd206a8e7712514e2
2016-08-31 16:51:15 +03:00
ricolin d80f7a0ba8 Fix HttpUrlConnectionError error message format
The origin message format is simply a coding mistake. Users will get
useless error message since we didn't really passing correct `url` in
error message. This patch fix HttpUrlConnectionError error message
format.

Closes-Bug: #1614048

Change-Id: I5b9b5dcfca053097622ea6b701aa758ee1a5aa8e
2016-08-19 05:56:23 +00:00
Alexander Gordeev da7a578473 Configure admin NIC prior the first system boot
Having admin NIC confugured in the middle of system booting
is very fragile and error-prone approach.
It's better to configure it ahead of first booting time.

Also, there's no need for freaky networking restarting inside of
cloud-init boothooks anymore.

Change-Id: I4c278341e8b40eb8d9b100bed1d9a650f27b5c5b
Related-Bug: #1583815
2016-08-16 18:29:09 +03:00
Dmitry Teselkin 426d2a39f4 Fix bootstrap apt-get update issues
Sometimes 'apt-get update' fail with strange error:

  Get:22 http://mirror.fuel-infra.org/mos-repos/ubuntu/10.0 mos10.0-updates Release.gpg [473 B]
  Err:22 http://mirror.fuel-infra.org/mos-repos/ubuntu/10.0 mos10.0-updates Release.gpg
    Writing more data than expected (473 > 20) [IP: 208.78.244.194 80]

This is only reproduced during running bootstrap, and never reproduced manually.

APT::http::Pipeline-Depth=0 fixes the problem.

By default pipeline depth is 10 in apt 1.2.10 (Ubuntu Xenial) [1], [2].

[1] https://github.com/Debian/apt/blob/1.2.10/doc/apt.conf.5.xml#L402-L407
[2] https://github.com/Debian/apt/blob/1.2.10/methods/server.cc#L754-L756

Related-bug: #1612731
Related-bug: #1470468

Change-Id: Iac8c22d87f18718ae9a318dda56266f8ed57f866
2016-08-15 15:43:10 +00:00
Jenkins 095987ab05 Merge "Remove extra root= kernel parameter" 2016-07-29 08:38:30 +00:00
Dmitry Teselkin 47e8b24a12 Remove extra root= kernel parameter
Xenial-based IBP kernel boot parameters contain 'root=UUID=XXX'
record where 'XXX' points to UID of lvm volume,but in this moment
lvm groups is not activated and root partition cannot be mounted.

This occurs because script, which should activate lvm, does not handle
'UUID' option. Lvm2 Xenial package relying on presence of systemd to
activate its volumes.

In early releases this works by specific udev rules
(/lib/udev/rules.d/85-lvm2.rules)

Change-Id: I8ebe209e4de479a30c70222a35cabcfacbfd2e6c
blueprint: mos-xenial
Closes-Bug: 1552346
2016-07-28 18:19:22 +03:00
Dmitry Teselkin 49ca8e9be6 Mask mcollective systemd unit
Mcollective should be disabled in IBP.
This always true for upstart job, but we
missed that for systemd.

Change-Id: I779ecd39c4646f2432c1f43a46971fea8205010f
blueprint: mos-xenial
2016-07-22 12:23:36 +03:00
Ivan Suzdal faa9de1780 Disable cloud-init network auto configuration
blueprint: mos-xenial

Change-Id: I21dd00ed797e82a82297436a58c57f936d9dd13a
2016-07-20 12:49:04 +03:00
Alexey Stupnikov e6a31c8456 Fix logger issue in move_files_to_their_places function
A typo in manager.py was fixed. This typo doesn't break
anything when old enough oslo.log module is used, but it
breaks deployment process when newer OS is used to build
bootstrap image.

A minor issue with path build process was also fixed.

Change-Id: I97616ef0bfbe0f7ffc6e625e4bf7c7ffde1a1919
Closes-Bug: #1597697
2016-07-08 15:35:52 +03:00
Alexander Gordeev d40821e9a7 Fix order of imports
oslo_* imports belong to 3rd party libraries and should be imported
before local imports.

Change-Id: I5773343ef53741c28414fa738b90717f5eacab53
Partial-Bug: #1594850
2016-06-21 19:55:28 +03:00
Ronald Bradford 6966bed353 Graduate to oslo.log and cleanup Oslo incubator
Implements: graduate-oslo-log [1]
[1] https://blueprints.launchpad.net/oslo.log/+spec/graduate-oslo-log

Change-Id: I8184d8907e080d26fd9c92461f14b32b171974ba
2016-06-08 11:58:59 -04:00
Alexander Gordeev e2a20044b2 Use any disk for /boot regardless of its size
Apparently, the disks which're bigger than 2T were excluded from list
of bootable disks if possible. Just because in the past, those disks
were unrecognized by BIOS (or UEFI under CSM).

In fact, it was just misconfiguration of RAID controller or BIOS
itself.

GRUB uses BIOS INT13h in order to find all available disks.
Therefore, unless particular disk is not configured as 'bootable',
there's no change for GRUB to find it.

One should configure hardware in the following way assuming that
the first disk (hd0) is bootable and is used for operating system
purposes.
In case of hardware RAID, FC multipath or any other HBA, the disk
(or lun, or whatever) which was configured as 'bootable' will be
reported as hd0 via INT13h. So, GRUB will be able to boot from it.

DocImpact
Closes-Bug: #1588260

Change-Id: I7bc729ffafa3b9d6bfe8521fa38599d36d02f7e1
2016-06-02 15:53:57 +03:00
Alexander Gordeev af247ea07a Add option to choose partition alignment mode
Under certain circumstances due to that alignment, the end of
particular partition could cross 1M boundary. And due to actual
partition' bounderies being rounded up, fuel-agent mistakenly
assumes that partition couldn't fit within provided boundaries
and raises errors.WrongPartitionSchemeError.

However, some h/w data storages are well known for reporting
relatively huge optimal IO sizes (16M or even bigger), so the 1M
room can't be enough. Thus, optimal aligning is not an option.
In such cases, it's better to proceed with minimal mode.

It's the minimum aligment needed to align the partition properly
to physical blocks which avoids performance degradation.

Partial-Bug: #1543233
DocImpact

Change-Id: I1dd94731f497f3deb47cec9a23957e3706c2fb3b
2016-05-20 16:18:57 +03:00
Jenkins ce4af55423 Merge "Revert "Switch from optimal alignment to minimum"" 2016-05-20 12:39:16 +00:00
Jenkins 5167165a22 Merge "Using bootable if set for disk" 2016-05-19 14:29:04 +00:00
Jenkins 23e70dc55d Merge "Move files from mount points to actual file systems" 2016-05-17 14:15:49 +00:00
Jenkins c55731eb14 Merge "Fix get_release_file retries" 2016-05-17 10:39:50 +00:00
Jenkins 3725a02581 Merge "Remove NVMe devices workaround due to fixed LP #1551432" 2016-05-16 17:01:23 +00:00
alexz b905e31ebf Fix get_release_file retries
Due to fact that mirrors are not always up, there is very rare possibility
 that client will waste time of full bootstrap image building due to 2-3
 second downtime of a mirror. Also, due specific work-flow of fuel mirrors
 that may introduces instability to CI jobs.

Change-Id: Icecc1f4e355713ee95ac5e8d0d13ea326630c056
Closes-bug: #1563366
2016-05-16 16:52:40 +03:00
Vladimir Kozhukalov 5809a3fea9 Move files from mount points to actual file systems
The thing is that sometimes we have file system images and mount
point hierachies which are not aligned. Let's say, we have root
file system image, while partition scheme says that two file
systems should be created on the node: / and /var. In this case
root image has /var directory with a set of files. Obviously, we
need to move all these files from /var directory on the root
file system to /var file system because /var directory will be
used as mount point.
In order to achieve this we mount all existent file systems into
a flat set of temporary directories. We then try to find
specific paths which correspond to mount points and move all
files from these paths to corresponding file systems.

Co-Authored-By: Alexey Stupnikov <astupnikov@mirantis.com>

Change-Id: I1aa7523055ac4bcf6f8a93e9740ccf652ed35cc1
Closes-Bug: #1537699
2016-05-13 20:20:52 +03:00
Ivan Suzdal f8b132442a Remove NVMe devices workaround due to fixed LP #1551432
Change-Id: I205ed65c19aa01e883d1ca02a136b679ed8eb802
Closes-Bug: #1580723
2016-05-12 16:53:56 +03:00
Krzysztof Szukiełojć 5a56d6a4e8 Using bootable if set for disk
If nailgun will send as bootable flag for disk we have to use this
disk and place '/boot' on it

Change-Id: I881d9fd4bb378dec78fd86aff0c314c910525110
Closes-bug: 1567450
2016-05-12 11:41:19 +02:00
Aleksandr Gordeev f3b3e93fb7 Revert "Switch from optimal alignment to minimum"
That switching is way too intrusive.
It's better to give a user an ability to control which alignment mode
will be used by adding an option to fuel-agent config file.

This reverts commit 4c74eaa187.

Change-Id: Ia492d1479da170a9c76633c9b87c165c47f8d34b
2016-05-05 15:19:12 +03:00
Dmitry Guryanov 8f5c03dcac change configdrive format to ConfigDrive version 2
We put configdrive with is9660 filesystem to a
partition on a hard disk. New hard disks may have
4K sectors, but blocksize of iso9660 fs is 2K so
it will not work.

To fix this bug we should use another filesystem (ext2)
and another config drive format (files, directory
structure), because NoCloud format, which is currently
used support only vfat and iso9660 filesystems.

Change-Id: Ia0f244f19bab3dfaceef8a092ad03667675a5557
Closes-Bug: #1544818
2016-04-28 18:06:18 +00:00