Commit Graph
100 Commits
Author SHA1 Message Date
Akim JuilleratandGitHub cd33d12527 Merge pull request #167 from grindtildeath/9.0-fix_auth_to_keystone_v3
[9.0] attachment_swift: Fix authentication to Keystone v3
2020-03-09 13:33:28 +01:00
Akim Juillerat e68423bc54 Fix authentication to Keystone v3
- Use newer version from python lib.
 - Define project_domain_id + user_domain_id in auth
2020-03-09 13:10:23 +01:00
Akim JuilleratandGitHub 99a4e59d35 Merge pull request #150 from grindtildeath/9.0_dev_attachments
[9.0] Require AWS_BUCKETNAME for prod, integration and labs environments only
2020-03-05 10:01:12 +01:00
Patrick TombezandGitHub 2c23459778 Merge pull request #155 from p-tombez/9.0-keystoneauth_v3
[9.0] Use keystoneauth v3 for Swift attachments
2020-03-04 11:21:31 +01:00
Mussie SirakandPatrick Tombez d319b42fce Use keystoneauth v3 for Swift attachments 2020-03-04 11:09:55 +01:00
Akim Juillerat c657507a4b Require AWS_BUCKETNAME for prod, integration and labs environments only
AWS_BUCKETNAME is only needed in order to write on the bucket, but
read-only access should be allowed for other environments.

Fixes bug introduced by 6c3b610610
2020-02-25 16:02:11 +01:00
Patrick TombezandGitHub d214e82a46 Merge pull request #132 from p-tombez/9.0-anon_redis_session
[9.0] Add anonymous redis session expiration configuration
2020-01-31 11:15:33 +01:00
Patrick Tombez 5a07cc4f60 Add anonymous redis session expiration configuration 2020-01-29 16:42:39 +01:00
Guewen BaconnierandGitHub 477480df42 Merge pull request #103 from camptocamp/revert-98-9.0-monitoring_check_db_connection
Revert "[9.0] [IMP] monitoring_status: check the db is reachable"
2019-11-18 13:50:38 +01:00
Guewen BaconnierandGitHub e1a516615c Revert "[9.0] [IMP] monitoring_status: check the db is reachable" 2019-10-29 17:31:01 +01:00
Simone OrsiandGitHub 51527cd253 Merge pull request #98 from gurneyalex/9.0-monitoring_check_db_connection
[9.0] [IMP] monitoring_status: check the db is reachable
2019-10-28 08:09:35 +01:00
Alexandre Fayolle 1a56848a46 [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 14:52:58 +02:00
Simone OrsiandGitHub 57e03f1a6c Merge pull request #76 from guewen/9.0-monitoring_status-ignore-http
[9.0] Ignore HTTP version in monitoring_status filter
2019-08-09 11:56:03 +02:00
Simone OrsiandGuewen Baconnier 1b10458d98 Ignore HTTP version in monitoring_status filter 2019-08-09 11:44:24 +02:00
Guewen BaconnierandSimone Orsi cca0ba6bd8 [9.0] Filter /monitoring/status werkzeug logs (#68)
* 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:23 +02:00
Timon TschanzandGitHub 8332929cb4 Merge pull request #64 from tschanzt/fix_inverse_datas
Fix inverse datas for swift storage
2019-06-18 17:09:13 +02:00
Timon Tschanz f5fdc3a7cf Fix inverse datas for swift storage 2019-05-31 18:03:47 +02:00
Guewen BaconnierandGitHub 92ca087101 Merge pull request #55 from guewen/swift-auth-session
attachment_swift: share a session for all connections
2019-05-07 15:29:16 +02:00
Guewen Baconnier 3e20f1563f 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-02 16:45:59 +02:00
Guewen Baconnier 4e919d85cb 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-02 16:13:04 +02:00
Guewen Baconnier 85d32e44c6 Add missing variable in documentation example 2019-05-02 15:29:16 +02:00
Guewen Baconnier 6d27097ca9 Add setuptools files 2018-12-03 10:04:53 +01:00
Guewen Baconnier 5d9a51ef8c Edit readme 2018-12-03 10:04:33 +01:00
jcouxandGitHub 6f21400653 Merge pull request #40 from camptocamp/add_ovh_in_v9
[9.0] Backport OVH modules from 10.0
2018-10-30 12:04:39 +01:00
jcoux a3c61c6c6c Backport fix on session check crash (PR 33) 2018-10-30 08:54:01 +01:00
jcoux 7fc296d73e Backport OVH modules from 10.0 2018-10-29 13:45:20 +01:00
jcoux c6a0e7c1f5 Get OVH modules from 10.0 2018-10-29 11:10:49 +01:00
Guewen BaconnierandGitHub 8bd5049b7d Merge pull request #36 from guewen/9.0-force-storage-at-upgrades
9.0 Fix attachments stored in FS instead of object storage
2018-06-14 09:34:30 +02:00
Guewen Baconnier d1bb60fc11 attachment_s3: bump 1.3.0 2018-06-13 17:26:08 +02:00
Guewen Baconnier c3d9aceb0f 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 17:16:07 +02:00
Guewen Baconnier ddb7656abd 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 17:15:45 +02:00
Guewen Baconnier f915b8a1be 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 17:15:18 +02:00
jcouxandGitHub 06e6f96326 Merge pull request #25 from guewen/monitoring-short-living-sessions
Expire sessions generated by health checks quickly
2018-01-11 08:20:39 +01:00
Guewen Baconnier a0c926a478 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-04 09:27:50 +01:00
Guewen BaconnierandGitHub 7f5f6d0f92 Merge pull request #14 from guewen/9.0-better-s3-access-error-msg
[9.0] Make error message more precise for S3 access
2017-08-29 11:37:15 +02:00
Guewen Baconnier 64b79cc848 Make error message more precise for S3 access
The previous error message let think that you should set AWS_BUCKETNAME,
although you should set it only if you are trying to write in this
repository.
2017-08-28 14:40:31 +02:00
Guewen BaconnierandGitHub 418e0cc3ff Merge pull request #10 from guewen/9.0-session-redis-sentinel
[9.0] Allow to use a Redis Sentinel
2017-05-18 16:40:14 +02:00
Guewen Baconnier bcb4b8b98d Allow to use a Redis Sentinel 2017-05-16 09:07:30 +02:00
Guewen Baconnier 4823d10eb5 Do not force metrics on production 2017-04-29 09:19:16 +02:00
Guewen Baconnier 5d6fc2722c Fix calls on multi instead of record 2017-04-26 15:58:39 +02:00
Vincent RenavilleandGitHub fa008a3e83 Merge pull request #9 from vrenaville/delivery_carrier_label_s3
[FIX] call method on attachement_id instead of self
2017-02-15 19:01:37 +01:00
vrenaville b57ee6bf95 [FIX] call method on attachement_id instead of self 2017-02-15 18:57:20 +01:00
vrenaville a8501bf67c [FIX] call method on attachement_id instead of self 2017-02-15 18:50:32 +01:00
Vincent RenavilleandGitHub 14ad7fb30a Merge pull request #8 from vrenaville/delivery_carrier_label_s3
Delivery carrier label s3
2017-02-15 15:46:38 +01:00
vrenaville c4b5ba142d [ADD] OCA dependencies 2017-02-15 13:58:44 +01:00
vrenaville 3a29134fc4 [FIX] adapt license 2017-02-15 13:39:58 +01:00
vrenaville 68d9d8de19 [ADD] delivery_carrier_label_s3 module 2017-02-15 13:23:42 +01:00
Guewen BaconnierandGitHub 188643b7d3 Merge pull request #7 from guewen/fix-slow-partner-kanban-view
Fix Contacts view too slow to display
2017-02-09 13:13:53 +01:00
Guewen Baconnier 4d8400d0bf Fix Contacts view too slow to display
The 'base' Kanban view for res.partner in 9.0 loads the large 'image'
field in the 'search_read' but display the 'small_image'. The js code
also has to issue js calls to get the small images as they have not been
prefetched. This is noticeably slow to load when the large images are
read from S3 which is slower than a local filesystem/database.

This fix loads the 'small_image' instead of the large one.

This bug has been fixed in Odoo 10.0.
2017-02-09 11:49:23 +01:00
Guewen Baconnier 8ad99c9336 Add more details in asserts 2017-01-17 11:07:36 +01:00