Commit Graph

20 Commits

Author SHA1 Message Date
Andy Botting 7d481ad60e Fix another base64 python3 issue
This is to address another usage of base64 that was missed from
commit 794c47f3b8823e97a0f019064e4b74a5ee204d04

Change-Id: I9bbff8084d82928deeafa6a55c487ed0f665b470
2020-10-30 19:29:19 +11:00
zhurong 84f5778fc5 Remove six usage
Change-Id: Ia6b08e81f8df43e67bed0fbd082d7d7edd178fbc
2020-04-16 04:34:44 -07:00
Stan Lagun 2468fb5939 Tighten access to runtime agent folders
Murano Agent uses default folder permissions for the
execution plans and scripts. If the default is too permissive
(which is unusual), other users on that machine can trick
the agent to execute malicious execution plans by putting files
into queue folder and use it to get the root privileges.
In most common sense users won't have write permissions to murano-agent
folders. However, they can hijack execution plans and other data
that might contain sensitive information.

This commit sets 0700 mode to the agent runtime folders so that they
can be accessed only by the user that runs the agent (+ the root,
if it's someone else).

Change-Id: I27f0495a509c4d1435d630e2bc5bfdf3549486d5
2017-11-22 10:00:26 -08:00
Cao Xuan Hoang 3cfdbe8fc9 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: I599f637c39518076d7182b86aecbc8034076be49
2016-09-26 15:53:58 +07:00
Victor Stinner cdc4bde0b1 Python 3: Fix basic py3 issues
Run the sixer program to catch most common Python 3 issues and make
the code compatible with Python 2 and Python 3.

* Replace it.next() with next(it)
* Replace dict.keys()[0] with list(dict.keys())[0], since
  dict.keys() now returns an dictview on Python 3. Same change
  for dict.values()[0].
* Replace urlparse with six.moves.urllib.parse
* Replace __builtin__ with six.moves.builtins

Blueprint: murano-python-3-support
Change-Id: I9b95c3eee14c2de0010e9a3bbdffdda76496a03c
2016-06-20 21:57:12 +00:00
Henar Muñoz Frutos d075358882 Remove hardcoded destinations for puppet/chef processing engine
When cookbooks are transfered from murano to
murano-agent, they are stored in another folder
which chef/puppet expect.

Closes-Bug: #1508492

Change-Id: I1363e46d655c8a641a1fa404faadc5f652f9fce4
2015-11-19 13:39:14 +00:00
Ravi Shekhar Jethani 0550e96b55 Remove unnecessary rmtree call
The clear() method is calling rmtree() to delete cache folder
but the call is being made twice. The second call is unnecessary.

Change-Id: I78b0ed2417b3775604816bf078abedce79406edd
Closes-Bug: #1513010
2015-11-04 20:04:57 -08:00
Henar Muñoz Frutos ffcf7ec7de Adding svn for file download.
Murano agent can download files in the VM when it is executing the
 execution plan. However, just git client is allowed for download
 files. Svn client should be provided to add files in a svn repository

Closes Bug: #1486055
Change-Id: Ib1fd13fa86d012fb95d19aabda0dff7c28f99620
2015-09-23 16:25:17 +02:00
Sergey Vilgelm 55f94816ea Switch to the oslo.log library
Use oslo.log instead of oslo-incubator.
Use oslo.log instead of system logging.
Add oslo.log to the requirements.txt.
Remove unused oslo-incubator modules.

Implements: blueprint port-oslo-incubator-to-oslo-log

Partial-Bug: 1481370
Change-Id: I7047497f2022b0c56be0f3811f1bb59ffe470877
2015-08-05 15:44:00 +03:00
Doug Hellmann f4c07e1ae7 Update requirements
Manually updating the requirements, since this project isn't in
the list getting requirements syncs from global requirements. Updating
hacking required some format changes to docstrings, and I included those
in this patch.

Change-Id: Ib33f6308ed121fa2350eb32846e476f2a9dd28f4
2015-06-25 23:15:05 +00:00
Henar Muñoz Frutos 836de93669 Folder Not Found with Git Downloadable File
When there is a downloadable type file which is a git repository,
a folder not found error appears:  No such file or directory

Also updated unit tests to work on Windows

Closes Bug: #1444862

Change-Id: I5ebb01b8d2c324e4e603a90142433b2abbbd62a2
2015-04-22 03:38:55 +03:00
Stan Lagun 9a3ec32cc5 Fixes file placement
Incorrect generation of file path where to put script symlink caused
"OSError: [Errno 2] No such file or directory" exception to be raised
after first execution plan run

Change-Id: I955d01deb8ff4bb5ddf8a39340cbe4439bb8311a
Closes-Bug: #1439767
2015-04-11 02:14:59 +03:00
Jenkins 63186f21cd Merge "Support for Configuration Language: Puppet" 2015-04-10 08:34:14 +00:00
Henar Muñoz Frutos 42f27a6b6a Support for Configuration Language: Puppet
It allows for Puppet as configuration language in the execution plans.
In addition, it creates a base class (ChefPuppetExecutorBase) for
sharing common methods between Puppet and Chef executors.

Change-Id: I65ae656117aa26fc7dff4f83a2be1b4d2c3cb58b
2015-04-08 16:44:30 +02:00
Alexey Deryugin db96ac30d0 Fixes image building, CI tests and requirements
[DIB] Add posibility to build image from specified commit of agent
Included gitpython, required by file-downloading feature
Incorrect generation of file path where to put script symlink caused
"OSError: [Errno 2] No such file or directory" exception to be raised
after first execution plan run

Change-Id: Ifb6dffde5afd5ad5ce363934be71c7cc1e046de2
Closes-Bug: #1439367
Closes-Bug: #1439767
Co-Authored-By: Stan Lagun <slagun@mirantis.com>
Co-Authored-By: Kirill Zaitsev <kzaitsev@mirantis.com>
2015-04-03 13:45:54 +03:00
Henar Muñoz Frutos d7af39d3dd Support for Configuration Language. File Downloading
Execution plan files can be tranfered as binaries as just an URL to be download.
This code download the file when it is a URL

Partially-Implements Blueprint: conf-language-support

Change-Id: I102546a04a93dc74a4647cc8ad7a33d78ebca86b
2015-03-24 15:59:41 +01:00
Ekaterina Chernova fdc8de63fe Fix typo in files_manager.py
Change-Id: If44563c23ec44fe75f2f6ff5c9de92bd396ec1bb
2015-03-18 15:21:27 +03:00
Ekaterina Fedorova 218a51ece1 Enable H301, H302, H304, H306, H231, H233
Fix the following issues:
* Python 3.x compatibility
* Module imports

Change-Id: Ie6bfa1c3eb1494da3b9222b162a40a1181e41188
2014-08-29 13:32:56 +00:00
Ekaterina Fedorova 334106047c Add sample config and it's checker
* Add scripts for generation sample configs
* Fix name in setup.cfg, otherwise module is not recognized
* Add check to pep8 to follow new config parameters

Change-Id: I42918abc7fdcf9c6779c4e97ba7f2b605b9057e8
2014-08-25 18:49:01 +04:00
Ruslan Kamaldinov 79c7da668a Extract main python client to the top
C and Windows clients were moved to directory 'contrib'.

Change-Id: I2a31a965d38f4f750abf9c8dfa90b249dbe1aeba
2014-05-29 20:02:50 +04:00