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

Refactored DictField + Added value size limit to metadata field #321

Merged
merged 5 commits into from
Dec 18, 2017

Conversation

dn0
Copy link
Member

@dn0 dn0 commented Dec 14, 2017

Related update of user guide: erigones/esdc-docs@9182b99

@dn0 dn0 added this to the 3.0.0 milestone Dec 14, 2017
@dn0 dn0 self-assigned this Dec 14, 2017
dn0 added a commit to erigones/esdc-docs that referenced this pull request Dec 14, 2017
@dn0 dn0 requested a review from secult December 14, 2017 07:52
Copy link
Contributor

@secult secult left a comment

Choose a reason for hiding this comment

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

It doesn't work if you put an apache license as a value multiple times to the metadata

@dn0
Copy link
Member Author

dn0 commented Dec 15, 2017

@secult In commit f7c9974 you can see some forgotten code, that is not needed anymore. The idea of the repr and load_repr was that we wanted to allow copy-paste of jsons into metadata values (which accept only strings). In the mean-time we've introduced raw json editing, which made this code obsolete. If you look at load_repr() you'll find a bug -> the string is modified, then parsed and in case of an error the modified string is returned (instead of the original string).

Obviously this is not the real problem. We are changing VM configuration via vmadm update and we pass the json with the update payload via stdin. vmadm calls fs.readFile('/dev/stdin') (https://github.com/erigones/smartos-live/blob/master/src/vm/sbin/vmadm.js#L697), which seems OK. But it turns out that fs.readFile is broken nodejs/node-v0.x-archive#7412 in nodejs shipped in SmartOS :(

TritonDataCenter/smartos-live#753

dn0 added a commit to erigones/esdc-docs that referenced this pull request Dec 16, 2017
@secult secult merged commit 84b0e1c into v2.7 Dec 18, 2017
@secult secult deleted the metadatafield_max_size branch December 18, 2017 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants