Re: [libvirt] [v1.2.9-maint] Teach virt-aa-helper to use TEMPLATE.qemu if the domain is kvm or kqemu

2015-06-19 Thread Guido Günther
On Sat, Jun 13, 2015 at 11:10:57AM -0600, Eric Blake wrote: On 06/13/2015 02:48 AM, Guido Günther wrote: (cherry picked from commit 16d2bc8b98563f801f111795250515fcbd39ab46) --- Succesfully tested on Debian at: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=786652

[libvirt] [PATCH] virsh: blockcopy: Report error if the copy job fails

2015-06-19 Thread Peter Krempa
When the block job would fail while watching it using the --wait option for blockcopy, virsh would rather unhelpfully report: $ virsh blockcopy vm hdc /tmp/raw.img --granularity 4096 --verbose --wait Now in mirroring phase Add a special case when the block job vanishes while waiting for it to

Re: [libvirt] [PATCH v3 00/24] Add support for migration events

2015-06-19 Thread Jiri Denemark
On Wed, Jun 10, 2015 at 17:13:12 +0200, Peter Krempa wrote: On Wed, Jun 10, 2015 at 15:42:34 +0200, Jiri Denemark wrote: QEMU will soon (patches are available on qemu-devel) get support for migration events which will finally allow us to get rid of polling query-migrate every 50ms. However,

Re: [libvirt] [[PATCH v1] update sheepdog client] update sheepdog client path

2015-06-19 Thread Michal Privoznik
On 18.06.2015 15:20, Vasiliy Tolstov wrote: Nnever sheepdog versions have dog client binary while old have collie. Check them both. Signed-off-by: Vasiliy Tolstov v.tols...@selfip.ru --- configure.ac | 10 +- src/storage/storage_backend_sheepdog.c | 12

Re: [libvirt] cloud-init integration

2015-06-19 Thread Daniel P. Berrange
On Fri, Jun 19, 2015 at 12:44:51PM +0200, Tobias Florek wrote: Hi, if that has been discussed before, please point me to it. I have not been able to find anything about it. It would be great to easily generate and cd-attach cloud-init isos when starting a vm. The config files could be

Re: [libvirt] cloud-init integration

2015-06-19 Thread Vasiliy Tolstov
2015-06-19 13:44 GMT+03:00 Tobias Florek libv...@ibotty.net: if that has been discussed before, please point me to it. I have not been able to find anything about it. It would be great to easily generate and cd-attach cloud-init isos when starting a vm. The config files could be taken from

[libvirt] [libvirt-sandbox][PATCH] configure: Require newer libvirt-glib

2015-06-19 Thread Michal Privoznik
In the commit 68406aff new feature was introduced - users are allowed to select the format of mounted host images. However, this uses some libvirt-glib features that were introduced in the 0.2.1 release, e.g. the symbol GVIR_CONFIG_DOMAIN_FILESYS_DRIVER_LOOP was introduced in dbd063fe. So we must

Re: [libvirt] [RFC] qemu: Redesigning guest CPU configuration

2015-06-19 Thread Daniel Hansel
On 18.06.2015 15:41, Daniel P. Berrange wrote: On Wed, Jun 17, 2015 at 05:37:42PM +0200, Jiri Denemark wrote: Hi all (and sorry for the long email), The current way QEMU driver handles guest CPU configuration is not ideal. We detect host CPU capabilities only by querying the CPU and we

Re: [libvirt] libvirt proxy

2015-06-19 Thread Michal Privoznik
On 18.06.2015 00:55, Vasiliy Tolstov wrote: Hello. I need libvirt proxy, but not simple proxy connection, but something like dedicated libvirt server, that can modify requests or doing something based on incoming request. I'm use go for this, i'm already parse xdr data, but i'm stuck at

Re: [libvirt] libvirt proxy

2015-06-19 Thread Vasiliy Tolstov
2015-06-19 14:55 GMT+03:00 Michal Privoznik mpriv...@redhat.com: As Dan says, I too discourage you from doing this. But if you really need to dig into RPC, then: 1) payload is just function arguments serialized. In general, two functions have different set of arguments, and therefore

[libvirt] [[PATCH v6] autocreate tap device for VIR_DOMAIN_NET_TYPE_ETHERNET] autocreate tap device for VIR_DOMAIN_NET_TYPE_ETHERNET

2015-06-19 Thread Vasiliy Tolstov
If a user specify ehernet device create it via libvirt and run script if it provided. After this commit user does not need to run external script to create tap device or add root to qemu process. Signed-off-by: Vasiliy Tolstov v.tols...@selfip.ru --- src/qemu/qemu_command.c | 142

Re: [libvirt] [[PATCH v6] autocreate tap device for VIR_DOMAIN_NET_TYPE_ETHERNET] autocreate tap device for VIR_DOMAIN_NET_TYPE_ETHERNET

2015-06-19 Thread Daniel P. Berrange
On Fri, Jun 19, 2015 at 11:49:08AM +0300, Vasiliy Tolstov wrote: 2015-06-19 11:46 GMT+03:00 Daniel P. Berrange berra...@redhat.com: Nitpick - not need for %s - just use virCommandAddArg() Do i need to fix this ?=) If another review is fine with this patch, we can just fix it when merging.

Re: [libvirt] [PATCH 2/4] virNetSocketRemoveIOCallback: Be explicit about unref

2015-06-19 Thread Erik Skultety
On 06/18/2015 03:11 PM, Michal Privoznik wrote: When going through the code I've notice that virNetSocketAddIOCallback() increases the reference counter of @socket. However, its counter part RemoveIOCallback does not. It took me a while to realize this disproportion. The AddIOCallback

[libvirt] [libvirt-php][PATCH 0/7] Switch to space indent instead of TABs

2015-06-19 Thread Michal Privoznik
Yeah, this is a big change. However, it's needed. Indenting by TABs leads to more headache and the sooner we do this the better. I've pushed the patches to my github too: https://github.com/zippy2/libvirt-php/commits/fixes Maybe we should introduce a syntax-check rule too. BUT - there's no

[libvirt] [libvirt-php][PATCH 2/7] vncfunc.c: :retab

2015-06-19 Thread Michal Privoznik
Let's not use tabs but spaces instead. This way the formatting will be consistent no matter how big tab skips are. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/vncfunc.c | 1397 - 1 file changed, 698 insertions(+), 699

[libvirt] [libvirt-php][PATCH 6/7] generate-api-docs: Adapt to new comments style

2015-06-19 Thread Michal Privoznik
Previously, it assumed that there's only one star at the beginning of the comment block and one at the end. The usual C comment style. Now that I reformatted the comments every line starts with a star. Update the docs generator to reflect this. Signed-off-by: Michal Privoznik mpriv...@redhat.com

[libvirt] [libvirt-php][PATCH 1/7] sockets.c: :retab

2015-06-19 Thread Michal Privoznik
Let's not use tabs but spaces instead. This way the formatting will be consistent no matter how big tab skips are. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/sockets.c | 353 +- 1 file changed, 176 insertions(+), 177

[libvirt] [libvirt-php][PATCH 7/7] libvirt_stream_close: Pass the actual connect object

2015-06-19 Thread Michal Privoznik
There's a bug in the function. When closing a stream, the stream refcount should be decremented. We have a helper function for that which (among others) take a virConnectPtr as an argument. However, we are passing an internal representation of the virConnect. Even gcc warns about this:

[libvirt] [libvirt-php][PATCH 5/7] generate-api-docs.c: :retab

2015-06-19 Thread Michal Privoznik
Let's not use tabs but spaces instead. This way the formatting will be consistent no matter how big tab skips are. Moreover, at the same time, reformat the code a bit to be more readable. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- tools/generate-api-docs.c | 449

Re: [libvirt] Socket files in virt-aa-helper

2015-06-19 Thread Michał Dubiel
Hi Serge, This is exactly what I had done locally when I solved the permission issues for my project, however removal of S_IFSOCK restriction is not enough to make vhost-user work correctly. You need also the changes to get_files() I wrote in the first e-mail about. I'll send a patch for review

[libvirt] cloud-init integration

2015-06-19 Thread Tobias Florek
Hi, if that has been discussed before, please point me to it. I have not been able to find anything about it. It would be great to easily generate and cd-attach cloud-init isos when starting a vm. The config files could be taken from the file system (e.g. %sysconfdir/cloud-init/host-name) and

Re: [libvirt] [Qemu-devel] incorrect memory size inside vm

2015-06-19 Thread Piotr Rybicki
Hello. Actually it was my mistake. After some time using memory in guest (find /, cp bigfine, etc), res size of qemu process shrinks to expected value. Sorry for disturbing. Now i don't see any memory waste in guest and host when using 'base' memory + 'dimm' memory. Although i have one

Re: [libvirt] [libvirt-sandbox][PATCH] configure: Require newer libvirt-glib

2015-06-19 Thread Daniel P. Berrange
On Fri, Jun 19, 2015 at 01:28:56PM +0200, Michal Privoznik wrote: In the commit 68406aff new feature was introduced - users are allowed to select the format of mounted host images. However, this uses some libvirt-glib features that were introduced in the 0.2.1 release, e.g. the symbol

[libvirt] FW: CPU Usage and Memory Usage for VM and Host

2015-06-19 Thread Kumar R, Prashanth (Prashanth)
Hi All, I would like to know if there is a way to fetch the CPU Usage and Memory Usage for VM and CPU Usage and Memory Usage for a Host in the KVM environment using libvirt java sdk . I am using libvirt-0.5.1.jar. This is the maximum Information I could fetch using the libvirt java API.:

Re: [libvirt] [[PATCH v6] autocreate tap device for VIR_DOMAIN_NET_TYPE_ETHERNET] autocreate tap device for VIR_DOMAIN_NET_TYPE_ETHERNET

2015-06-19 Thread Michal Privoznik
On 19.06.2015 10:21, Vasiliy Tolstov wrote: If a user specify ehernet device create it via libvirt and run script if it provided. After this commit user does not need to run external script to create tap device or add root to qemu process. Signed-off-by: Vasiliy Tolstov v.tols...@selfip.ru

Re: [libvirt] [[PATCH v6] autocreate tap device for VIR_DOMAIN_NET_TYPE_ETHERNET] autocreate tap device for VIR_DOMAIN_NET_TYPE_ETHERNET

2015-06-19 Thread Vasiliy Tolstov
2015-06-19 11:46 GMT+03:00 Daniel P. Berrange berra...@redhat.com: Nitpick - not need for %s - just use virCommandAddArg() Do i need to fix this ?=) -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- libvir-list mailing list libvir-list@redhat.com

[libvirt] [PATCH] virt-aa-helper: Fix permissions for vhost-user socket files

2015-06-19 Thread Michal Dubiel
QEMU working in vhost-user mode communicates with the other end (i.e. some virtual router application) via unix domain sockets. This requires that permissions for the socket files are correctly written into /etc/apparmor.d/libvirt/libvirt-UUID.files. Signed-off-by: Michal Dubiel m...@semihalf.com

Re: [libvirt] [PATCH 6/8] lib: setvcpus: Remove bogous flag check

2015-06-19 Thread Pavel Hrdina
On Tue, Jun 16, 2015 at 07:43:18PM +0200, Peter Krempa wrote: Since VIR_DOMAIN_AFFECT_CURRENT is 0 the flag check does not make sense as masking @flags with 0 will always equal to false. --- src/libvirt-domain.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/src/libvirt-domain.c

Re: [libvirt] [PATCH 0/4] A cople of memleak fixes

2015-06-19 Thread Erik Skultety
On 06/18/2015 03:10 PM, Michal Privoznik wrote: One thing that I still haven't figured out is, when the daemon is waiting in the even loop, in poll() and SIGINT comes, it jumps out and cleanup phase begins. However, the event loop may still be the one and only holding a reference to some

Re: [libvirt] libvirt proxy

2015-06-19 Thread Vasiliy Tolstov
2015-06-18 14:13 GMT+03:00 Daniel P. Berrange berra...@redhat.com: I really discourage anyone from trying to fit the libvirt API over a cloud system. In general the libvirt API is designed to be fairly host-centric. We did once have a libvirt driver that targetted a cloud system, but we

Re: [libvirt] [[PATCH v6] autocreate tap device for VIR_DOMAIN_NET_TYPE_ETHERNET] autocreate tap device for VIR_DOMAIN_NET_TYPE_ETHERNET

2015-06-19 Thread Vasiliy Tolstov
2015-06-19 11:21 GMT+03:00 Vasiliy Tolstov v.tols...@selfip.ru: If a user specify ehernet device create it via libvirt and run script if it provided. After this commit user does not need to run external script to create tap device or add root to qemu process. Signed-off-by: Vasiliy Tolstov

Re: [libvirt] [[PATCH v1] update sheepdog client] update sheepdog client path

2015-06-19 Thread Vasiliy Tolstov
2015-06-18 16:20 GMT+03:00 Vasiliy Tolstov v.tols...@selfip.ru: Nnever sheepdog versions have dog client binary while old have collie. Check them both. Signed-off-by: Vasiliy Tolstov v.tols...@selfip.ru Any suggestions? -- Vasiliy Tolstov, e-mail: v.tols...@selfip.ru -- libvir-list

[libvirt] [libvirt-php][PATCH 4/7] libvirt-php.h: :retab

2015-06-19 Thread Michal Privoznik
Let's not use tabs but spaces instead. This way the formatting will be consistent no matter how big tab skips are. Signed-off-by: Michal Privoznik mpriv...@redhat.com --- src/libvirt-php.h | 244 +++--- 1 file changed, 122 insertions(+), 122

Re: [libvirt] [libvirt-php][PATCH 4/7] libvirt-php.h: :retab

2015-06-19 Thread Vasiliy Tolstov
2015-06-19 12:17 GMT+03:00 Michal Privoznik mpriv...@redhat.com: Let's not use tabs but spaces instead. This way the formatting will be consistent no matter how big tab skips are. Thanks, my editor detect format and use it when i'm write new code. -- Vasiliy Tolstov, e-mail:

Re: [libvirt] [[PATCH v6] autocreate tap device for VIR_DOMAIN_NET_TYPE_ETHERNET] autocreate tap device for VIR_DOMAIN_NET_TYPE_ETHERNET

2015-06-19 Thread Daniel P. Berrange
On Fri, Jun 19, 2015 at 11:21:15AM +0300, Vasiliy Tolstov wrote: If a user specify ehernet device create it via libvirt and run script if it provided. After this commit user does not need to run external script to create tap device or add root to qemu process. Signed-off-by: Vasiliy Tolstov

Re: [libvirt] [libvirt-php][PATCH 7/7] libvirt_stream_close: Pass the actual connect object

2015-06-19 Thread Vasiliy Tolstov
2015-06-19 12:17 GMT+03:00 Michal Privoznik mpriv...@redhat.com: There's a bug in the function. When closing a stream, the stream refcount should be decremented. We have a helper function for that which (among others) take a virConnectPtr as an argument. However, we are passing an internal

Re: [libvirt] [PATCH 8/8] test: Fix lock ordering in testDomainRevertToSnapshot

2015-06-19 Thread Michal Privoznik
On 16.06.2015 19:43, Peter Krempa wrote: The test driver lock should not be acquired while a domain object lock is held. Tweak the lock ordering to avoid possible deadlock. --- src/test/test_driver.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

Re: [libvirt] [[PATCH v1] update sheepdog client] update sheepdog client path

2015-06-19 Thread Vasiliy Tolstov
2015-06-19 17:47 GMT+03:00 Michal Privoznik mpriv...@redhat.com: It does! Truth to be told, only ACK from a developer with a commit access counts as green light for merging the patches, but hey - more eyes more see. And you can discover a bug in patch too. Or express your feeling about it. Or

Re: [libvirt] [PATCH 3/8] test: Refactor test driver domain object retrieval

2015-06-19 Thread Michal Privoznik
On 16.06.2015 19:43, Peter Krempa wrote: Add testDomObjFromDomainLocked and reuse it together with testDomObjFromDomain to retrieve domain objects in the qemu driver s/qemu/test/ instead of open-coding it in every API. --- src/test/test_driver.c | 409

Re: [libvirt] [RFC] qemu: Redesigning guest CPU configuration

2015-06-19 Thread Jiri Denemark
On Thu, Jun 18, 2015 at 14:41:17 +0100, Daniel P. Berrange wrote: On Wed, Jun 17, 2015 at 05:37:42PM +0200, Jiri Denemark wrote: Hi all (and sorry for the long email), The current way QEMU driver handles guest CPU configuration is not ideal. We detect host CPU capabilities only by

Re: [libvirt] [PATCH 2/8] test: Switch to reference counting with testDomObjFromDomain

2015-06-19 Thread Michal Privoznik
On 16.06.2015 19:43, Peter Krempa wrote: Retrieve domain objects with reference and release them with virDomainObjEndAPI. --- src/test/test_driver.c | 89 -- 1 file changed, 35 insertions(+), 54 deletions(-) diff --git

Re: [libvirt] [[PATCH v1] update sheepdog client] update sheepdog client path

2015-06-19 Thread Michal Privoznik
On 19.06.2015 16:14, Vasiliy Tolstov wrote: 2015-06-19 17:11 GMT+03:00 Michal Privoznik mpriv...@redhat.com: ACKed and pushed. We are short on review bandwidth, so don't expect review right after a patch is sent to the list. Moreover, you can help reviewing too ;-) Thanks. But if i

Re: [libvirt] [RFC] qemu: Redesigning guest CPU configuration

2015-06-19 Thread Daniel P. Berrange
On Fri, Jun 19, 2015 at 04:36:34PM +0200, Jiri Denemark wrote: On Thu, Jun 18, 2015 at 14:41:17 +0100, Daniel P. Berrange wrote: So either we need to define all existing CPU models in all their variants used for various machine types and have a mapping between (model without a version,

Re: [libvirt] [PATCH 4/8] test: Refactor test driver event sending

2015-06-19 Thread Michal Privoznik
On 16.06.2015 19:43, Peter Krempa wrote: Make testObjectEventQueue tolerant to NULL @event and move it so that it does not require a prototype. Additionally add testObjectEventQueueUnlocked that will lock @driver before sending the event. Refactor the rest of the codebase to make use of the

Re: [libvirt] [PATCH 0/8] Test driver refactors and fixes

2015-06-19 Thread Michal Privoznik
On 16.06.2015 19:43, Peter Krempa wrote: Note that patch 1/8 of this series depends on patch 2/13 of the vCPU pinning and related refactors - Part 1.5 series: http://www.redhat.com/archives/libvir-list/2015-June/msg00678.html Peter Krempa (8): test: Reuse virDomainObjGetOneDef in

Re: [libvirt] [PATCH 7/8] test: Refactor testDomainSetVcpusFlags

2015-06-19 Thread Ján Tomko
On Tue, Jun 16, 2015 at 07:43:19PM +0200, Peter Krempa wrote: Remove the bogous flag check and refactor the code by using s/bogous/bogus virDomainObjGetDefs instead of virDomainObjGetPersistentDef. --- src/test/test_driver.c | 68 +- 1 file

Re: [libvirt] [[PATCH v1] update sheepdog client] update sheepdog client path

2015-06-19 Thread Vasiliy Tolstov
2015-06-19 17:11 GMT+03:00 Michal Privoznik mpriv...@redhat.com: ACKed and pushed. We are short on review bandwidth, so don't expect review right after a patch is sent to the list. Moreover, you can help reviewing too ;-) Thanks. But if i review code from something else, my vote does nothing

Re: [libvirt] [PATCH] virsh: blockcopy: Report error if the copy job fails

2015-06-19 Thread Eric Blake
On 06/19/2015 07:46 AM, Peter Krempa wrote: When the block job would fail while watching it using the --wait option for blockcopy, virsh would rather unhelpfully report: $ virsh blockcopy vm hdc /tmp/raw.img --granularity 4096 --verbose --wait Now in mirroring phase Add a special case

Re: [libvirt] [[PATCH v6] autocreate tap device for VIR_DOMAIN_NET_TYPE_ETHERNET] autocreate tap device for VIR_DOMAIN_NET_TYPE_ETHERNET

2015-06-19 Thread Eric Blake
On 06/19/2015 02:21 AM, Vasiliy Tolstov wrote: Subject line is awkward; better would have been: [libvirt] [PATCH v6] autocreate tap device for VIR_DOMAIN_NET_TYPE_ETHERNET Note that the mailing list prepends [libvirt], and 'git format-patch/send-email -v6' prepends [PATCH v6], meaning your

Re: [libvirt] [PATCH libvirt] libxl: avoid freeing an uninitialised bitmap

2015-06-19 Thread Eric Blake
On 06/19/2015 10:33 AM, Ian Campbell wrote: If vm-def-cputune.nvcpupin is 0 in libxlDomainSetVcpuAffinities (as seems to be the case on arm) then the VIR_FREE after cleanup: would be operating on an uninitialised pointer in map.map. Fix this by using libxl_bitmap_init and

Re: [libvirt] [libvirt-php][PATCH 7/7] libvirt_stream_close: Pass the actual connect object

2015-06-19 Thread Eric Blake
On 06/19/2015 03:17 AM, Michal Privoznik wrote: There's a bug in the function. When closing a stream, the stream refcount should be decremented. We have a helper function for that which (among others) take a virConnectPtr as an argument. However, we are passing an internal representation of

Re: [libvirt] [libvirt-php][PATCH 0/7] Switch to space indent instead of TABs

2015-06-19 Thread Eric Blake
On 06/19/2015 03:17 AM, Michal Privoznik wrote: Yeah, this is a big change. However, it's needed. Indenting by TABs leads to more headache and the sooner we do this the better. I've pushed the patches to my github too: https://github.com/zippy2/libvirt-php/commits/fixes Maybe we should

[libvirt] [PATCH libvirt] libxl: avoid freeing an uninitialised bitmap

2015-06-19 Thread Ian Campbell
If vm-def-cputune.nvcpupin is 0 in libxlDomainSetVcpuAffinities (as seems to be the case on arm) then the VIR_FREE after cleanup: would be operating on an uninitialised pointer in map.map. Fix this by using libxl_bitmap_init and libxl_bitmap_dispose in the appropriate places (like VIR_FREE

Re: [libvirt] [libvirt-php][PATCH 7/7] libvirt_stream_close: Pass the actual connect object

2015-06-19 Thread Michal Novotny
Nice work catch. Thanks, Michal Dne 19.6.2015 18:49 Eric Blake ebl...@redhat.com napsal(a): On 06/19/2015 03:17 AM, Michal Privoznik wrote: There's a bug in the function. When closing a stream, the stream refcount should be decremented. We have a helper function for that which (among

Re: [libvirt] [[PATCH v6] autocreate tap device for VIR_DOMAIN_NET_TYPE_ETHERNET] autocreate tap device for VIR_DOMAIN_NET_TYPE_ETHERNET

2015-06-19 Thread Vasiliy Tolstov
19 июня 2015 г. 19:46 пользователь Eric Blake ebl...@redhat.com написал: On 06/19/2015 02:21 AM, Vasiliy Tolstov wrote: Subject line is awkward; better would have been: [libvirt] [PATCH v6] autocreate tap device for VIR_DOMAIN_NET_TYPE_ETHERNET Note that the mailing list prepends

Re: [libvirt] [PATCH] virt-aa-helper: Fix permissions for vhost-user socket files

2015-06-19 Thread Serge Hallyn
Quoting Michal Dubiel (m...@semihalf.com): QEMU working in vhost-user mode communicates with the other end (i.e. some virtual router application) via unix domain sockets. This requires that permissions for the socket files are correctly written into /etc/apparmor.d/libvirt/libvirt-UUID.files.

Re: [libvirt] [PATCH] virt-aa-helper: Fix permissions for vhost-user socket files

2015-06-19 Thread John Ferlan
On 06/19/2015 03:30 PM, Serge Hallyn wrote: Quoting Michal Dubiel (m...@semihalf.com): QEMU working in vhost-user mode communicates with the other end (i.e. some virtual router application) via unix domain sockets. This requires that permissions for the socket files are correctly written

Re: [libvirt] [PATCH libvirt] libxl: avoid freeing an uninitialised bitmap

2015-06-19 Thread Jim Fehlig
On 06/19/2015 10:54 AM, Eric Blake wrote: On 06/19/2015 10:33 AM, Ian Campbell wrote: If vm-def-cputune.nvcpupin is 0 in libxlDomainSetVcpuAffinities (as seems to be the case on arm) then the VIR_FREE after cleanup: would be operating on an uninitialised pointer in map.map. Fix this by using