Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Moar storage-attached #11
Conversation
axw
added some commits
Jan 27, 2015
wallyworld
reviewed
Jan 28, 2015
| @@ -35,4 +35,6 @@ type StorageInstance struct { | ||
| // Location is the location relevant to the datastore (block device, filesystem). | ||
| Location string `yaml:"location" json:"location"` | ||
| + | ||
| + RequestedLocation string `yaml:"requested-location" json:"requested-location"` |
wallyworld
reviewed
Jan 28, 2015
| - if err := createFilesystem(devicePath); err != nil { | ||
| - logger.Errorf("failed to create filesystem on block device %q: %v", blockDevices[i].Name, err) | ||
| + if blockDevices[i].FilesystemType == "" { | ||
| + if err := createFilesystem(devicePath); err != nil { |
wallyworld
Jan 28, 2015
Owner
I can't see how we know to create a file system as opposed to leaving it as a raw block device
axw
Jan 28, 2015
Collaborator
Line 101/103:
if storageInstance.Kind != storage.StorageKindFilesystem {
wallyworld
reviewed
Jan 28, 2015
| + // TODO(axw) determine what the appropriate | ||
| + // course of action is here. For now, this | ||
| + // works. | ||
| + StorageId: "fake/0", |
wallyworld
Jan 28, 2015
Owner
don't quite follow this but if it works....
do we have to have a value for StorageId?
axw
Jan 28, 2015
Collaborator
Yes, see worker/uniter/modes.go. This is a hack, I'm not sure how it's meant to work. Will need to talk with William.
wallyworld
reviewed
Jan 28, 2015
| - case "location": | ||
| - values[key] = storageInstance.Location | ||
| - default: | ||
| - return errors.Errorf("invalid storage instance key %q", key) |
wallyworld
Jan 28, 2015
Owner
We just want to ignore invalid keys rather than print an error? I'd prefer an error. Maybe a todo for now?
|
LGTM with questions answered. Main question - how does diskformatter know whether to format vs just keeping a raw block device |
axw
added some commits
Jan 28, 2015
added a commit
that referenced
this pull request
Jan 28, 2015
wallyworld
merged commit 6406f42
into
wallyworld:storage-feature
Jan 28, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
axw commentedJan 28, 2015
and it defaults to the hook storage instance.
are specified, you get a map; if one is
specified you just get that attribute's value.