dirien
(Engin Diri)
2021 年 6 月 14 日午前 5:45
1
みなさんこんにちは、
奇妙な問題に遭遇しました。
私たちの設定は以下の通りです:
Discourse: 2.8.0.beta2
S3: Minio
CDN: Myra
S3 の設定は以下の通りです:
root@assets-prod-app01:~# sudo -u minio mc admin policy info minio readwrite-discourse
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:ListBucketMultipartUploads",
"s3:GetBucketLocation",
"s3:ListBucket"
],
"Resource": [
"arn:aws:s3:::discourse"
]
},
{
"Effect": "Allow",
"Action": [
"s3:*"
],
"Resource": [
"arn:aws:s3:::discourse/*"
]
}
]
}
しかし、編集を行うたびに以下のエラーメッセージが表示されます:
ログファイルには以下のような記録があります:
Aws::S3::Errors::NotImplemented (A header you provided implies functionality that is not implemented)
lib/file_store/s3_store.rb:279:in `update_ACL'
lib/file_store/s3_store.rb:209:in `update_upload_ACL'
...
見落としている設定があるのでしょうか、それとも Minio は Discourse と互換性がないのでしょうか?
ユーザーから少しプレッシャーを感じているため、どのようなヒントでもありがたいです
よろしくお願いいたします。
dirien
(Engin Diri)
2021 年 6 月 22 日午前 4:24
2
この設定はそれほど珍しくないのでしょうか?
より詳しく確認すべき点や、変更すべき点についてご教示いただければ幸いです。@Falco 現在、私たちはかなり行き詰まっています…
Falco
(Falco)
2021 年 6 月 22 日午後 4:55
3
サイト設定の secure_uploads を有効にしましたか?MinIO では 全く 動作しません。
Falco
(Falco)
2021 年 6 月 22 日午後 9:01
5
dirien
(Engin Diri)
2021 年 7 月 1 日午前 5:03
7
お手数をおかけしますが、何かお気づきの点はありますか?
dirien
(Engin Diri)
2021 年 7 月 8 日午前 5:32
8
こんにちは、何かアイデアはありますか?お手数をおかけしてすみません…
こんにちは、
今日は 2.8.0.beta2 にアップグレードしましたが、同じエラーが発生しました:
secure_media を選択するだけで、minio が再び動作します。
Falco
(Falco)
2021 年 7 月 8 日午後 3:50
10
@pmusaraj / @martin 13110 番のプルリクエストによって引き起こされた回帰のようです。
master ← issue/update-upload-secure-status-on-post-revision
merged 03:32AM - 21 May 21 UTC
When uploads are created from the composer (editing or creating a post),
for si… tes with secure uploads enabled we assume security by default and
that new upload is set to secure. When the post is created, we then
check whether the post uploads _actually_ need to be secure and adjust
accordingly.
We were not doing this when revising a post, so when a new upload was
created when editing a post in a public topic, the secure status stayed
true erroneously causing issues with image previews, among other things.
これは、以下のコミットで修正された内容と同じものを考慮していませんでした。
committed 04:20PM - 25 Nov 19 UTC
In `post_creator`, the ACL update is only necessary when uploads need to be secu… red.
This should fix a regression with S3 clones that do not support updating ACLs.
したがって、post_creator は以下を実行します。
また、models/post は以下を実行します。
# Revises a post with the given fields and options.
#
# @param editor [User] The user performing the revision
# @param fields [Hash] Hash of fields to update
# @param opts [Hash] Optional parameters for the revision
# @option opts [Time] :revised_at Changes the date of the revision
# @option opts [Boolean] :force_new_version Bypass grace period edit window
# @option opts [Boolean] :bypass_rate_limiter Bypass the max limits per day rate limiter
# @option opts [Boolean] :bypass_bump Do not bump the topic. Takes precedence over should_bump_topic plugin modifier, and any other should_bump? logic
# @option opts [Boolean] :skip_validations Ask ActiveRecord to skip validations
# @option opts [Boolean] :skip_revision Do not create a new PostRevision record
# @option opts [Boolean] :skip_staff_log Skip creating an entry in the staff action log
# @option opts [Boolean] :silent Don't send notifications to user
# @return [Boolean] Returns true if the revision was successful, false otherwise
def revise!(editor, fields, opts = {})
@editor = editor
@fields = fields.with_indifferent_access
@opts = opts
@topic_changes = TopicChanges.new(@topic, editor)
「いいね!」 1
martin
(Martin Brennan)
2021 年 7 月 9 日午前 12:18
12
この問題に対する修正は、パフォーマンス向上の目的で既に行われており、あなたの問題も解決するはずです:
committed 04:15PM - 21 Jun 21 UTC
When secure uploads are enabled, editing a post with many uploads can
cause a t… imeout because the store has to be contacted for each upload.
ただし、セキュアメディアが無効化されている場合はジョブが早期に終了するように修正を追加するつもりでした。
実際には上記の対応はできません。セキュアメディアが無効化されている場合、または投稿が異なるカテゴリに移動された場合は、投稿のアップロードを「非セキュア」としてマークする必要があるためです。その代わり、Discourse.store.update_upload_ACL(self) を実行する際に Aws::S3::Errors::NotImplemented エラーを捕捉する修正を追加します。これにより、プライベート ACL をサポートしないクライアントでも問題なく動作するはずです。
編集:本日はこの修正をマージしました。お役に立てれば幸いです。FIX: Handle storage providers not implementing ACLs by martin-brennan · Pull Request #13675 · discourse/discourse · GitHub
来週新しいベータ版をリリースする予定でもあります。
「いいね!」 3
Falco
(Falco)
クローズされました:
2021 年 7 月 12 日午前 11:00
13
このトピックは3日後に自動的に閉鎖されました。新しい返信は受け付けられません。