-
Notifications
You must be signed in to change notification settings - Fork 59
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
do not upgrade config to backend storage in api/config #214
base: main
Are you sure you want to change the base?
Conversation
@dillaman ping for review, thanks! |
Signed-off-by: Kevin Zhao <[email protected]>
a45b5d2
to
1cc6ec2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the config is expected to be in a "upgraded" format, you now might hit issues in the API method since it's expecting certain fields. Is the issue just that it updates the config file even if it didn't need to upgrade?
The situation is: when we run update target/client with multiple threads, at the same time there are api/config calls. The metadata update at api/config side will overide the metadata that need to be changed, but not write to DB. The scenario I find is: |
@dillaman is there a method to slow down the frequency of api/config calls? If so I think the situation will be better. |
Hmm. It's almost sounding like any API methods that will update the config should first grab the RADOS lock on the config via a |
@dillaman Sorry for late response. I wonder why api/config method need to refresh the backend DB? |
I think it's because another GW API might have updated something so it can race w/ the true state. We just need to do a better job w/ the locking of the config object. |
@dillaman Yeah it sounds like the problem. Do you mean every changing of the "config object " and write to backend need to be locked? |
The [1] https://github.com/ceph/ceph-iscsi/blob/master/ceph_iscsi_config/common.py#L445 |
Fix #213