This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################ | |
## Using Genetic Algorithms in Quantitative Trading | |
## | |
## thertrader@gmail.com - Mar 2014 | |
############################################################ | |
library(PerformanceAnalytics) | |
library(rgenoud) | |
library(quantmod) | |
library(TTR) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
code: | |
for name, data := range secretName.Data { | |
bytes := make([]byte, base64.StdEncoding.DecodedLen(len(data))) | |
l, err := base64.StdEncoding.Decode(bytes, data) | |
secret = string(bytes) | |
glog.Errorf("%s: secret info %v/%v/%v/%s len %d err %v", name, pod.Namespace, spec.VolumeSource.RBD.SecretName, data, secret, l, err) | |
} | |
output: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func (plugin *RBDPlugin) NewBuilder(spec *volume.Spec, pod *api.Pod, _ volume.VolumeOptions, mounter mount.Interface) (volume.Builder, error) { | |
secret := "" | |
glog.V(1).Infof("rbd spec %v", spec) | |
glog.V(1).Infof("rbd volumeSource %v", spec.VolumeSource) | |
glog.V(1).Infof("rbd volumeSource RBD %v", spec.VolumeSource.RBD) | |
if spec.VolumeSource.RBD.SecretRef != nil { <------------- nil pointer panic | |
kubelet log: | |
I0617 17:05:49.140208 31091 rbd.go:77] rbd spec &{docker-registry-config {<nil> <nil> <nil> <nil> <nil> <nil> <nil> <nil> <nil> <nil> <nil>} {<nil> <nil> <nil> <nil> <nil> 0xc20862cf00 <nil>}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@gprfc028 kubernetes]# more /tmp/claim*.yaml | |
:::::::::::::: | |
/tmp/claim1.yaml | |
:::::::::::::: | |
kind: PersistentVolumeClaim | |
apiVersion: v1beta3 | |
metadata: | |
name: docker-registry-config | |
spec: | |
accessModes: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
E0617 17:43:33.088341 11240 persistent_claim.go:80] Excepted volume.Spec.ClaimRef.UID e4963951-1539-11e5-bbf0-d4bed9b39058 but have e4963951-1539-11e5-bbf0-d4bed9b39058 | |
I0617 17:43:33.088391 11240 kubelet.go:2065] Generating status for "mypod_default" | |
E0617 17:43:33.093160 11240 util.go:69] Recovered from panic: "invalid memory address or nil pointer dereference" (runtime error: invalid memory address or nil pointer dereference) | |
/home/git/k8-cephfs/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/pkg/util/util.go:63 | |
/home/git/k8-cephfs/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/pkg/util/util.go:54 | |
/usr/lib/golang/src/runtime/asm_amd64.s:401 | |
/usr/lib/golang/src/runtime/panic.go:387 | |
/usr/lib/golang/src/runtime/panic.go:42 | |
/usr/lib/golang/src/runtime/sigpanic_unix.go:26 | |
/home/git/k8-cephfs/kubernetes/_output/local/go/src/github.com/GoogleCloudPlatform/kubernetes/pkg/volume/nfs/nfs.go:78 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func (kl *Kubelet) newVolumeBuilderFromPlugins(spec *volume.Spec, pod *api.Pod, opts volume.VolumeOptions, mounter mount.Interface) (volume.Builder, error) { | |
plugin, err := kl.volumePluginMgr.FindPluginBySpec(spec) | |
if err != nil { | |
return nil, fmt.Errorf("can't use volume plugins for %s: %v", spew.Sprintf("%#v", *spec), err) | |
} | |
if plugin == nil { | |
// Not found but not an error | |
return nil, nil | |
} | |
// dump spec here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"os" | |
"strings" | |
) | |
func main() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"os" | |
"path/filepath" | |
"strings" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"os" | |
"path/filepath" | |
"strings" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"os" | |
"path/filepath" | |
"strings" | |
) |
OlderNewer