Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rgw:user email can modify to empty #6094

Closed
wants to merge 1 commit into from

Conversation

dwj192
Copy link
Contributor

@dwj192 dwj192 commented Sep 28, 2015

user email can be empty in default
but can't modify to empty when it has value

now it can modify to empty when need

Signed-off-by: Weijun Duan duanweijun@h3c.com

@theanalyst theanalyst added the rgw label Sep 28, 2015
@ghost
Copy link

ghost commented Sep 28, 2015

@dwj192 please ignore the bot failure, it is a false negative due to http://tracker.ceph.com/issues/13176

@yehudasa
Copy link
Member

@dwj192 can you open a ceph tracker issue for that and note it in the commit message? Thanks

@dwj192
Copy link
Contributor Author

dwj192 commented Sep 30, 2015

@yehudasa done! Thanks

@dwj192
Copy link
Contributor Author

dwj192 commented Dec 21, 2015

@yehudasa
is it right now? thanks!

Fixes: ceph#13286

Signed-off-by: Weijun Duan <duanweijun@h3c.com>
@dwj192
Copy link
Contributor Author

dwj192 commented Feb 27, 2016

@yehudasa had delete email info in pool .users.email after set email to ""

@dwj192
Copy link
Contributor Author

dwj192 commented Feb 29, 2016

@yehudasa my test
// create user
root@compiler:/home/dwj/git/email1/src#./radosgw-admin user create --uid=keyuser --display-name=keysuer--access-key=keyuser --secret=keyuser
{
"user_id": "keyuser",
"display_name": "keysuer",
"email": "",
...
}

// add email for user
root@compiler:/home/dwj/git/email1/src#./radosgw-admin user modify --uid=keyuser --email=dwj@h3c.com
{
"user_id": "keyuser",
"display_name": "keysuer",
"email": "dwj@h3c.com",
...
}

// look .users.email pool exist email info
root@compiler:/home/dwj/git/email1/src#./rados ls -p .users.email
dwj@h3c.com
s3@example.com
john.doe@example.com
tester@ceph.com

// modify user other info, user stile,email info still exist
root@compiler:/home/dwj/git/email1/src#./radosgw-admin user modify --uid=keyuser --display-name=keyuser1
{
"user_id": "keyuser",
"display_name": "keyuser1",
"email": "dwj@h3c.com",
...
}

// rm email info, email is empty
root@compiler:/home/dwj/git/email1/src#./radosgw-admin user modify --uid=keyuser --email=""
{
"user_id": "keyuser",
"display_name": "keyuser1",
"email": "",
...
}

// look .users.email pool email is not exist
root@compiler:/home/dwj/git/email1/src#./rados ls -p .users.email
s3@example.com
john.doe@example.com
tester@ceph.com

@liewegas
Copy link
Member

rebase please

@oritwas
Copy link
Member

oritwas commented May 25, 2016

@dwj192 , your patch doesn't compile on master, can you update it?

@mattbenjamin mattbenjamin self-assigned this Aug 25, 2016

rgw_obj email_obj(store->zone.user_email_pool, user_info.user_email);
ldout(store->ctx(), 10) << "removing email index: " << user_info.user_email << dendl;
ret = store->delete_system_obj(email_obj);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to call rgw_remove_email_index() instead

@yehudasa
Copy link
Member

yehudasa commented Oct 5, 2016

@dwj192 closing this one in favor of this PR: #11340

@yehudasa yehudasa closed this Oct 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants