[ceph-users] radosgw-admin bucket stats doesn't show real num_objects and size

2023-04-11 Thread viplanghe6
The radosgw-admin bucket stats show there are 209266 objects in this bucket, 
but it included failed multiparts, so that make the size parameter is also 
wrong. When I use boto3 to count objects, the bucket only has 209049 objects. 

The only solution I can find is to use lifecycle to clean these failed 
multiparts, but in production, the client will decide to use lifecycle or not?
So are there any way to exclude the failed multiparts in bucket statistic?
Does Ceph allow to set auto clean failed multiparts globally?

Thanks!

"usage": {
"rgw.main": {
"size": 593286801276,
"size_actual": 593716080640,
"size_utilized": 593286801276,
"size_kb": 579381642,
"size_kb_actual": 579800860,
"size_kb_utilized": 579381642,
"num_objects": 209266
}
___
ceph-users mailing list -- ceph-users@ceph.io
To unsubscribe send an email to ceph-users-le...@ceph.io


[ceph-users] How to find the bucket name from Radosgw log?

2023-04-25 Thread viplanghe6
I find a log like this, and I thought the bucket name should be "photos":

[2023-04-19 15:48:47.0.5541s] "GET /photos/shares/

But I can not find it:

radosgw-admin bucket stats --bucket photos
failure: 2023-04-19 15:48:53.969 7f69dce49a80  0 could not get bucket info for 
bucket=photos
(2002) Unknown error 2002

How does this happen? Thanks
___
ceph-users mailing list -- ceph-users@ceph.io
To unsubscribe send an email to ceph-users-le...@ceph.io


[ceph-users] Radosgw: ssl_private_key could not find the file even if it existed

2023-05-04 Thread viplanghe6
The radosgw has been configured like this:

[client.rgw.ceph1]
host = ceph1
rgw_frontends = beast port=8080 ssl_port=443 ssl_certificate=/root/ssl/ca.crt 
ssl_private_key=/root/ssl/ca.key
#rgw_frontends = beast port=8080 ssl_port=443 ssl_certificate=/root/ssl/ca.crt 
ssl_private_key=config://rgw/cert/default/ca.key
admin_socket = /var/run/ceph/ceph-client.rgw.ceph1

but I'm getting this error:

failed to add ssl_private_key=/root/ssl/ca.key: No such file or directory

I also tried to import the key into ceph db and provided the path with 
config://, but it doesn't work too.

Anyone have any ideal? Thanks
___
ceph-users mailing list -- ceph-users@ceph.io
To unsubscribe send an email to ceph-users-le...@ceph.io


[ceph-users] Upgrade Ceph cluster + radosgw from 14.2.18 to latest 15

2023-05-08 Thread viplanghe6
Hi, I want to upgrade my old Ceph cluster + Radosgw from v14 to v15. But I'm 
not using cephadm and I'm not sure how to limit errors as much as possible 
during the upgrade process?

Here is my upgrade steps:
Firstly, upgrade from 14.2.18 to 14.2.22 (latest nautilus version)
Then, upgrade it from 14.2.22 to 15.2.17 (latest octopus version)

service restart order:
- restart monitors (sleep ~10)
- restart managers (sleep ~5)
- restart metadata OSDs (sleep ~30)
- restart data OSDs (sleep ~30)
- restart radosgw (sleep ~20)

Is there anything wrong with these steps?
Does 15.2.17 is the most stable version of Octopus?

Thanks.
___
ceph-users mailing list -- ceph-users@ceph.io
To unsubscribe send an email to ceph-users-le...@ceph.io


[ceph-users] Re: Upgrade Ceph cluster + radosgw from 14.2.18 to latest 15

2023-05-14 Thread viplanghe6
Yes, the documents show an example of upgrading from Nautilus to Pacific. But 
I'm not really 100% trusting the Ceph documents, and I'm also afraid of what if 
Nautilus is not compatible with Pacific in some operations of monitor or osd =)
___
ceph-users mailing list -- ceph-users@ceph.io
To unsubscribe send an email to ceph-users-le...@ceph.io


[ceph-users] RGW: Using Lua script to monitor storage class put operations

2023-05-14 Thread viplanghe6
I have a lua script that read Storageclass header of any put request (as I 
understand):
local function isempty(input)
  return input == nil or input == ''
end

if Request.RGWOp == 'put_obj' then
  RGWDebugLog("Put_Obj with StorageClass: " .. Request.HTTP.StorageClass )
end

Then apply the script:
radosgw-admin script put --infile=storage_class.lua --context=preRequest

Then put an object using boto3:
s3.Object(bucket, 'test-object').put(Body="0"*100, ACL='public-read', 
StorageClass='COLD')

But I can't find any log about it in radosgw log?
grep -i Lua /var/log/ceph/ceph-client.rgw.ceph1.log

Anyone have any ideal? Thanks
___
ceph-users mailing list -- ceph-users@ceph.io
To unsubscribe send an email to ceph-users-le...@ceph.io


[ceph-users] RGW: request fields in Lua script return wrong data?

2023-05-17 Thread viplanghe6
Thanks for your answer. I was able to get the Lua debug log. But I think some 
request fields don't work:

I have this lua script, for example:
if Request.HTTP.StorageClass == 'COLD' then
  RGWDebugLog(Request.RGWOp .. " request with StorageClass: "  .. 
Request.HTTP.StorageClass .. " Obj name: " .. Request.Object.Name .. " Obj ID: 
" .. Request.Object.Id .. " Size: " .. Request.Object.Size .. " MTime: " .. 
Request.Object.MTime )
end

I put an 1kb object using boto3:
s3.Object(bucket, 'test-object6').put(Body="0"*1000, ACL='public-read', 
StorageClass='COLD')

But the size and mtime field provided wrong data?
Lua INFO: put_obj request with StorageClass: COLD Obj name: test-object6 Obj 
ID: test-object6 Size: 0 MTime: 1970-01-01 08:00:00
___
ceph-users mailing list -- ceph-users@ceph.io
To unsubscribe send an email to ceph-users-le...@ceph.io


[ceph-users] Re: Upgrade Ceph cluster + radosgw from 14.2.18 to latest 15

2023-05-17 Thread viplanghe6
I just want the latest minor version before upgrading to the next major version 
:) This practice isn't recommended elsewhere, but I want to make sure and limit 
errors as much as possible.
___
ceph-users mailing list -- ceph-users@ceph.io
To unsubscribe send an email to ceph-users-le...@ceph.io