Commit Graph
118 Commits
Author SHA1 Message Date
Simone Orsi 3b17357e57 cloud_platform: fix default config
`_config_by_server_env` should always retutn a `PlatformConfig` instance
2020-02-04 13:40:33 +01:00
Patrick TombezandGitHub 5b8804ffc0 Merge pull request #133 from p-tombez/10.0-anon_redis_session
[10.0] Add anonymous redis session expiration configuration
2020-01-31 11:15:17 +01:00
Patrick Tombez abdd69a1b2 Add anonymous redis session expiration configuration 2020-01-29 16:36:35 +01:00
Yannick VaucherandGitHub ede68ba355 Merge pull request #120 from leemannd/10_remove_useless_log
[10.0] Add description to model
2019-12-10 10:59:45 +01:00
Denis Leemann 018161eb11 [10.0] Add description to model
This removes the useless warning at startup
2019-12-09 16:31:02 +01:00
Guewen BaconnierandGitHub 5217cc9a6f Merge pull request #107 from camptocamp/revert-102-10.0-monitoring_check_db_connection
Revert "[10.0] [IMP] monitoring_status: check the db is reachable"
2019-11-18 13:50:23 +01:00
Guewen BaconnierandGitHub bacb45d30c Revert "[10.0] [IMP] monitoring_status: check the db is reachable" 2019-10-29 17:32:42 +01:00
Simone OrsiandGitHub 3e91624edb Merge pull request #102 from gurneyalex/10.0-monitoring_check_db_connection
[10.0] [IMP] monitoring_status: check the db is reachable
2019-10-28 08:10:33 +01:00
Alexandre Fayolle d17cf7deb9 [IMP] monitoring_status: check the db is reachable
make a real SQL query on GET /monitoring/status and return a 503
if the query failed.
2019-10-25 16:21:10 +02:00
Simone OrsiandGitHub 5fa64d3e82 Merge pull request #75 from guewen/10.0-monitoring_status-ignore-http
[10.0] Ignore HTTP version in monitoring_status filter
2019-08-09 11:55:46 +02:00
Simone OrsiandGuewen Baconnier 3a2d524cd9 Ignore HTTP version in monitoring_status filter 2019-08-09 10:02:34 +02:00
Guewen BaconnierandSimone Orsi 9d25b72f74 [10.0] Filter /monitoring/status werkzeug logs (#67)
* Filter /monitoring/status werkzeug logs

With healtchecks, they constitute 95% of our logs. Let's stop wasting
resources and shut them up.
2019-07-19 15:34:02 +02:00
Guewen BaconnierandGitHub 17847a8f2f Merge pull request #61 from guewen/10.0-swift-auth-session
[10.0] attachment_swift: share a session for all connections
2019-05-21 14:52:13 +02:00
Guewen Baconnier c405f57cc2 Override dependencies with different name and pin versions
The name of the libs and python packages are different, Odoo expects
the inner python package in the manifest, but setuptools cannot find the
libs in pypi, overrides them with the libs names.
2019-05-09 10:09:44 +02:00
Guewen Baconnier 1178b6d9a4 Pin PyYAML version because 5.x does not work with Odoo
It would raise ConstructorError: could not determine a constructor for the tag '!record'
2019-05-09 10:09:44 +02:00
Guewen Baconnier 5a0c554749 attachment_swift: share a session for all connections
OVH's Swift applies a rate limit on the authentication.

attachment_swift authenticates again each time it has to read/write an
attachment. When running upgrades on upgrades of files or installing a
new DB, at some point, we get rejected with HTTP 429.

This commit introduces a shared storage for Swift Session. All
connections will reuses the same authentication token created the first
time a connection needs a Session.

Note: needs python-swiftclient>=3.7.0 to have
https://github.com/openstack/python-swiftclient/commit/1971ef880ff225379d4a91f00f89f323a1605eeb
2019-05-09 10:09:44 +02:00
Guewen Baconnier 0328868055 Add missing variable in documentation example 2019-05-09 10:06:02 +02:00
Patrick TombezandGitHub 67e7d27372 Merge pull request #52 from p-tombez/fix_s3_name_check
Fix S3 bucket name check to allow numbers
2019-04-24 12:03:02 +02:00
Patrick Tombez 3492b0a30d Fix S3 bucket name check to allow numbers 2019-04-24 11:53:43 +02:00
Guewen Baconnier 27e24e05f8 Add setuptools files 2018-12-03 09:25:08 +01:00
Guewen Baconnier 592637faa5 Edit readme 2018-12-03 09:24:35 +01:00
Guewen Baconnier 0d829264d8 base_attachment_object_storage: bump 1.2.0 2018-06-13 17:24:33 +02:00
Guewen BaconnierandGitHub 83ba63dbbb Merge pull request #34 from guewen/force-storage-at-upgrades
10.0 Fix attachments stored in FS instead of object storage
2018-06-13 17:17:35 +02:00
Guewen Baconnier 5039499b5b Document a weird domain which is there for a reason
The reason being:
https://github.com/odoo/odoo/blob/9032617120138848c63b3cfa5d1913c5e5ad76db/odoo/addons/base/ir/ir_attachment.py#L344-L347

I nearly deleted this domain but it was too weird to be there for no
reason. A comment explaining the issue was really missing.
2018-06-13 16:01:22 +02:00
Guewen Baconnier 5d2fdeafb1 Fix attachments stored in FS instead of object storage
Assume the following situation:

* We have installed addons base, sale and attachment_s3 (hence
base_attachment_object_storage as dependency)
* All attachments are in S3 already
* We run an upgrade of the 'base' addon, 'sale' is upgraded before
attachment_s3 in the order of loading.
* Sale updates the icon of the Sale menu
* As attachment_s3 is not loaded yet, the attachment is created in the
filestore

Now if we don't persist the filestore or use different servers, we'll
lose the images of the menus (or any attachment loaded by the
install/upgrade of an addon).

The implemented solution is to move the attachments from the filestore
to the object storage at the loading of the module. However, this
operation can take time and it shouldn't be run by 2 processes at the
same time, so we want to detect if the module is loaded during a normal odoo
startup or when some addons have been upgraded. There is nothing anymore
at this point which allow us to know that modules just have been
upgraded except... in the caller frame (load_modules). We have to rely
on the inpect module and get the caller frame, which is not recommended,
but seems the only way, besides, it's not called often and if
_register_hook was called from another place, it would have no effect
(unless the other place has a variable 'update_module' too).
2018-06-13 16:00:57 +02:00
Guewen Baconnier 896aec5976 Ensure that migration of files is commited before deleting files
When moving attachments from the filestore to an object storage,  the
filesystem files will be deleted only after the commit, so if the
transaction is rollbacked, we still have the local files for another
try.
2018-06-13 15:59:16 +02:00
Yannick VaucherandGitHub 43bbbe9822 Merge pull request #33 from yvaucher/fix-check-session_token
Fix session check crash due to odoo recent change [1]
2018-04-09 14:41:35 +02:00
Yannick Vaucher 697f5ae58f Fix session check crash due to odoo recent change [1]
Odoo introduced a token on 2018-03-19, this token is
used for checking the rights.

The token itself is generated from data as a hash.
The redis_session module handle it correctly by saving it aside other
data in json format. Nevertheless, when reading it, from json format,
it forces all strings to unicode whereas some dumped string where str.

Thus it fails on comparison between str and unicode.

This fix solves it by always using token in unicode format.

[1] https://github.com/odoo/odoo/pull/22612
2018-04-05 18:57:31 +02:00
Guewen BaconnierandGitHub 10917f3903 Merge pull request #32 from guewen/10.0-swift-pass-region-name
Propagage region_name to swift connection
2018-03-29 16:44:29 +02:00
Guewen Baconnier adfc398e0b Propagage region_name to swift connection
Otherwise, the bucket will be in the incorrect region
2018-03-16 09:11:33 +01:00
Guewen BaconnierandGitHub c8c08498ef Merge pull request #30 from guewen/10.0-fix-redis-stored-log
Fix order of args in logs
2018-03-15 12:28:08 +01:00
Guewen Baconnier bd423e1658 Fix order of args in logs 2018-03-13 15:01:16 +01:00
jcouxandGitHub c5bd5c1854 Merge pull request #26 from jcoux/1093_v10_monitoring-short-living-sessions
Expire sessions generated by health checks quickly
2018-01-11 09:42:46 +01:00
Guewen Baconnierandjcoux d0afebfa4b Expire sessions generated by health checks quickly
The default expiration of sessions is 7 days. With healthchecks run
every few seconds, we quickly have millions of anonymous sessions in
Redis. Allow to define a custom expiration for some sessions and set a
very short one for the monitoring requests.
2018-01-11 08:24:45 +01:00
Yannick VaucherandGitHub 3b1a0f4d8e Add travis badge on readme 2018-01-03 11:27:29 +01:00
Guewen BaconnierandGitHub a4a519b269 Merge pull request #24 from camptocamp/jcoux-patch-10-connection
[10.0] Fix connection errors when we read attachment
2018-01-03 08:53:22 +01:00
jcouxandGitHub bf2f5dcb20 [10.0] Fix connection errors when we read attachment 2017-12-22 07:47:54 +01:00
Yannick VaucherandGitHub 49ddc76ec3 Restore Param list for Storage S3 2017-11-16 13:22:15 +01:00
Guewen BaconnierandGitHub d54a67c9e3 Merge pull request #20 from guewen/10.0-object-storage-container-not-empty-check
Add check for empty bucket on integration
2017-11-15 14:59:23 +01:00
Guewen Baconnier f4ee0679c3 Add check for empty bucket on integration 2017-11-15 14:51:12 +01:00
Guewen BaconnierandGitHub 98d7bc3096 Merge pull request #19 from yvaucher/aws-region
Add AWS_REGION to connect to bucket with specific region
2017-11-15 14:28:54 +01:00
Yannick Vaucher a3c0322982 Add AWS_REGION to connect to bucket with specific region 2017-11-13 16:29:01 +01:00
Guewen BaconnierandGitHub aaf56d5027 Merge pull request #18 from TDu/mock-test-swift
Mock Swift client api in tests
2017-11-10 09:00:38 +01:00
Guewen Baconnier 7999386273 Fix tests
When there is no write container setup, no write/delete actions are
done.
2017-11-10 08:52:53 +01:00
Thierry Ducrest d79646d108 Add mocking in Swift tests 2017-11-09 11:33:36 +01:00
jcouxandGitHub 0fe1115bc9 Merge pull request #17 from camptocamp/jcoux-patch-fix-regex-redis
Fix regex on check ODOO_SESSION_REDIS_PREFIX
2017-10-26 13:21:48 +02:00
jcoux 55631073b1 Fix regex on check ODOO_SESSION_REDIS_PREFIX 2017-10-26 12:29:41 +02:00
Guewen BaconnierandGitHub 86e5bd3ad7 Merge pull request #16 from TDu/add-ovh-platform
[BSRTL-215] Add OVH as an option for the cloud platform
2017-09-21 09:03:46 +02:00
Guewen Baconnier ee8038b388 Update doc 2017-09-20 15:42:25 +02:00
Guewen Baconnier abe34fcaa2 Return empty result on file read error
This is how the core implementation works
2017-09-20 15:42:25 +02:00