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

Seems like build/cmd.sh build fails #375

Closed
miha-plesko opened this issue Aug 3, 2017 · 0 comments
Closed

Seems like build/cmd.sh build fails #375

miha-plesko opened this issue Aug 3, 2017 · 0 comments

Comments

@miha-plesko
Copy link
Contributor

Just checked out the lastest Virtlet master and run:

$ ./build/cmd.sh build
...
Making all in pkg/flexvolume
make[1]: Entering directory '/go/src/github.com/Mirantis/virtlet/pkg/flexvolume'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/go/src/github.com/Mirantis/virtlet/pkg/flexvolume'
make[1]: Entering directory '/go/src/github.com/Mirantis/virtlet'
make[1]: Nothing to be done for 'all-am'.
make[1]: Leaving directory '/go/src/github.com/Mirantis/virtlet'
if [ ! -d vendor ]; then \
	make install-vendor; \
fi
if [ ! -f ./vendor/github.com/libvirt/libvirt-go-xml/domain.go.orig ]; then \
	patch -d vendor/github.com/libvirt/libvirt-go-xml -p1 -b -i /go/src/github.com/Mirantis/virtlet/libvirt-xml-go.patch; \
fi
patching file domain.go
Hunk #1 FAILED at 522.
1 out of 1 hunk FAILED -- saving rejects to file domain.go.rej
Makefile:1141: recipe for target 'all' failed
make: *** [all] Error 1

where the content of domain.go.rej file is:

# cat domain.go.rej
--- domain.go
+++ domain.go
@@ -522,27 +522,70 @@ type DomainFeatureList struct {
 	SMM        *DomainFeatureState  `xml:"smm"`
 }
 
+type QemuArg struct {
+	Value string `xml:"value,attr"`
+}
+
+type QemuEnv struct {
+	Name  string `xml:"name,attr"`
+	Value string `xml:"value,attr,omitempty"`
+}
+
+type DomainCMDLine struct {
+	Args []QemuArg `xml:"arg"`
+	Envs []QemuEnv `xml:"env"`
+}
+
+type DomainCPUTuneShares struct {
+	Value uint `xml:",chardata"`
+}
+
+type DomainCPUTunePeriod struct {
+	Value uint64 `xml:",chardata"`
+}
+
+type DomainCPUTuneQuota struct {
+	Value int64 `xml:",chardata"`
+}
+
+type DomainCPUTune struct {
+	Shares *DomainCPUTuneShares `xml:"shares"`
+	Period *DomainCPUTunePeriod `xml:"period"`
+	Quota  *DomainCPUTuneQuota  `xml:"quota"`
+}
+
+type DomainMemoryBackingLocked struct {
+	//empty
+}
+
+type DomainMemoryBacking struct {
+	Locked *DomainMemoryBackingLocked `xml:"locked"`
+}
+
 // NB, try to keep the order of fields in this struct
 // matching the order of XML elements that libvirt
 // will generate when dumping XML.
 type Domain struct {
-	XMLName       xml.Name           `xml:"domain"`
-	Type          string             `xml:"type,attr,omitempty"`
-	Name          string             `xml:"name"`
-	UUID          string             `xml:"uuid,omitempty"`
-	Memory        *DomainMemory      `xml:"memory"`
-	CurrentMemory *DomainMemory      `xml:"currentMemory"`
-	MaximumMemory *DomainMaxMemory   `xml:"maxMemory"`
-	VCPU          *DomainVCPU        `xml:"vcpu"`
-	Resource      *DomainResource    `xml:"resource"`
-	SysInfo       *DomainSysInfo     `xml:"sysinfo"`
-	OS            *DomainOS          `xml:"os"`
-	Features      *DomainFeatureList `xml:"features"`
-	CPU           *DomainCPU         `xml:"cpu"`
-	OnPoweroff    string             `xml:"on_poweroff,omitempty"`
-	OnReboot      string             `xml:"on_reboot,omitempty"`
-	OnCrash       string             `xml:"on_crash,omitempty"`
-	Devices       *DomainDeviceList  `xml:"devices"`
+	XMLName       xml.Name             `xml:"domain"`
+	Type          string               `xml:"type,attr,omitempty"`
+	Name          string               `xml:"name"`
+	UUID          string               `xml:"uuid,omitempty"`
+	Memory        *DomainMemory        `xml:"memory"`
+	CurrentMemory *DomainMemory        `xml:"currentMemory"`
+	MaximumMemory *DomainMaxMemory     `xml:"maxMemory"`
+	MemoryBacking *DomainMemoryBacking `xml:"memoryBacking"`
+	VCPU          *DomainVCPU          `xml:"vcpu"`
+	CPUTune       *DomainCPUTune       `xml:"cputune"`
+	Resource      *DomainResource      `xml:"resource"`
+	SysInfo       *DomainSysInfo       `xml:"sysinfo"`
+	OS            *DomainOS            `xml:"os"`
+	Features      *DomainFeatureList   `xml:"features"`
+	CPU           *DomainCPU           `xml:"cpu"`
+	OnPoweroff    string               `xml:"on_poweroff,omitempty"`
+	OnReboot      string               `xml:"on_reboot,omitempty"`
+	OnCrash       string               `xml:"on_crash,omitempty"`
+	Devices       *DomainDeviceList    `xml:"devices"`
+	CMDLine       *DomainCMDLine       `xml:"http://libvirt.org/schemas/domain/qemu/1.0 commandline"`
 }
 
 func (d *Domain) Unmarshal(doc string) error {

I think it's because guys on libvirt-go-xml project added this line.

miha-plesko added a commit to miha-plesko/virtlet that referenced this issue Aug 4, 2017
Virtlet uses a patch to adjust libvirt-xml-go domain definition.
But due to changes in libvirt-xml-go upstream it's no longer possible
to apply the patch. With this commit we update the patch so that it
now follows the upstream. Also, some changes were conflicting therefore
we needed to modify the Virtlet code that relies on those changes.

Namely, virtlet's patch suggested following struct for providing bootcmd:
```
DomainCMDLine
|-> Args: []QemuArg
|-> Envs: []QemuEnv
```

but the upstream code now provides following struct:
```
DomainQEMUCommandline
|-> Args: []DomainQEMUCommandlineArg
|-> Envs: []DomainQEMUCommandlineEnv
```

So we had to enforce such naming also in Virtlet code.

Fixes Mirantis#375
Signed-off-by: Miha Pleško <[email protected]>
ivan4th pushed a commit to Mirantis/criproxy that referenced this issue Nov 18, 2017
Virtlet uses a patch to adjust libvirt-xml-go domain definition.
But due to changes in libvirt-xml-go upstream it's no longer possible
to apply the patch. With this commit we update the patch so that it
now follows the upstream. Also, some changes were conflicting therefore
we needed to modify the Virtlet code that relies on those changes.

Namely, virtlet's patch suggested following struct for providing bootcmd:
```
DomainCMDLine
|-> Args: []QemuArg
|-> Envs: []QemuEnv
```

but the upstream code now provides following struct:
```
DomainQEMUCommandline
|-> Args: []DomainQEMUCommandlineArg
|-> Envs: []DomainQEMUCommandlineEnv
```

So we had to enforce such naming also in Virtlet code.

Fixes Mirantis/virtlet#375
Signed-off-by: Miha Pleško <[email protected]>
ivan4th pushed a commit to Mirantis/criproxy that referenced this issue Nov 18, 2017
Virtlet uses a patch to adjust libvirt-xml-go domain definition.
But due to changes in libvirt-xml-go upstream it's no longer possible
to apply the patch. With this commit we update the patch so that it
now follows the upstream. Also, some changes were conflicting therefore
we needed to modify the Virtlet code that relies on those changes.

Namely, virtlet's patch suggested following struct for providing bootcmd:
```
DomainCMDLine
|-> Args: []QemuArg
|-> Envs: []QemuEnv
```

but the upstream code now provides following struct:
```
DomainQEMUCommandline
|-> Args: []DomainQEMUCommandlineArg
|-> Envs: []DomainQEMUCommandlineEnv
```

So we had to enforce such naming also in Virtlet code.

Fixes Mirantis/virtlet#375
Signed-off-by: Miha Pleško <[email protected]>
ivan4th pushed a commit to Mirantis/criproxy that referenced this issue Nov 18, 2017
Virtlet uses a patch to adjust libvirt-xml-go domain definition.
But due to changes in libvirt-xml-go upstream it's no longer possible
to apply the patch. With this commit we update the patch so that it
now follows the upstream. Also, some changes were conflicting therefore
we needed to modify the Virtlet code that relies on those changes.

Namely, virtlet's patch suggested following struct for providing bootcmd:
```
DomainCMDLine
|-> Args: []QemuArg
|-> Envs: []QemuEnv
```

but the upstream code now provides following struct:
```
DomainQEMUCommandline
|-> Args: []DomainQEMUCommandlineArg
|-> Envs: []DomainQEMUCommandlineEnv
```

So we had to enforce such naming also in Virtlet code.

Fixes Mirantis/virtlet#375
Signed-off-by: Miha Pleško <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant