I have 2 pods that use the same pvc to mount a pv so that they can share files through the mounted directory. Pod A has a Java Application that watches for new files (using java.nio.file.WatchService) in the mounted directory, but if pod B creates/renames/moves/etc. a file to this directory, it shows up on the volume and in pod A but doesn't fire an according event. When I rename or do anything with the file in pod A it gets recognized directly. The storage system is gluster-fs on a local kubernetes cluster.
Kubernetes shared persistent volume between pods results in no file events
980 Views Asked by Jefski14 At
1
There are 1 best solutions below
Related Questions in JAVA
- I need the BIRT.war that is compatible with Java 17 and Tomcat 10
- Creating global Class holder
- No method found for class java.lang.String in Kafka
- Issue edit a jtable with a pictures
- getting error when trying to launch kotlin jar file that use supabase "java.lang.NoClassDefFoundError"
- Does the && (logical AND) operator have a higher precedence than || (logical OR) operator in Java?
- Mixed color rendering in a JTable
- HTTPS configuration in Spring Boot, server returning timeout
- How to use Layout to create textfields which dont increase in size?
- Function for making the code wait in javafx
- How to create beans of the same class for multiple template parameters in Spring
- How could you print a specific String from an array with the values of an array from a double array on the same line, using iteration to print all?
- org.telegram.telegrambots.meta.exceptions.TelegramApiException: Bot token and username can't be empty
- Accessing Secret Variables in Classic Pipelines through Java app in Azure DevOps
- Postgres && statement Error in Mybatis Mapper?
Related Questions in KUBERNETES
- Golang == Error: OCI runtime create failed: unable to start container process: exec: "./bin": stat ./bin: no such file or directory: unknown
- I can't create a pod in minikube on windows
- Oracle setting up on k8s cluster using helm charts enterprise edition
- Retrieve the Dockerfile configuration from the Kubernetes and also change container Java parameter?
- Summarize pods not running, by Namespace and Reason - I'm having trouble finding the reason
- How to get Java running parameters from Spring Boot running inside container in pod where no ps exist
- How do we configure prometheus server to scrape metrics from a pod with Istio sidecar proxy?
- In rke kube-proxy pod is not present
- problem with edge server registration in Eureka
- Unable to Access Kubernetes LoadBalancer Service from Local Device Outside Cluster
- Kubernetes cluster on GCE connection refused error
- Based on my experience, I've outlined the Kubernetes request flow. Could someone please add or highlight any points I might have overlooked?
- how to define StackGres helm chart "restapi" values to use internal LoadBalancer - AWS EKS
- Python3.11 can't open file [Errno 2] No such file or directory
- Cannot find remote pod service - SERVICE_UNAVAILABLE
Related Questions in GLUSTERFS
- GlusterFS: Volume heal failed
- glusterFS with data lake
- pod failed to get Plugin from volumeSpec for volume in k8s,using gluster?
- I have a question regarding GlusterFS disk usage
- Kubernetes and storageclass gluster heketi
- How can I build a single list from the facts collected from hosts?
- How do I synchronize my gluster replicated volumes?
- How can I use the GlusterFS in Kubernetes without Heketi server?
- Failed to provision volume with StorageClass "gluster-heketi-storageclass" failed to create volume: see kube-controller-manager.log for details
- Does GlusterFS works only in the same subnet?
- Access GlusterFS file system in spring boot application
- In C function declaration 'params, ...)' equal to 'params...)'?
- GlusterFS - Is there an easy way to count the number of files on a brick?
- glusterfs error when delete directory - Transport endpoint is not connected
- Glusterfs how to balance bricks in single server?
Related Questions in WATCHSERVICE
- CSV File Parsing Issue - csvParser.iterator().next()
- Prevent Spam by Modify Events Java.NIO.WatchService
- Java NIO: Problem creating files in a renamed folder when observing a file tree
- Restart WatchService after exceptions
- java watchservice - running multiple job on cluster
- Java WatchService and Firefox strange behavior
- Java WatchService: Problem with AbsolutePath
- Which filesystems provide native support for Java's WatchService?
- WatchService large number of directory (recursive)
- WatchService: Filter event notification based on filename pattern
- monitor a Folder and extract all data in the file using java
- WatchService watching files on distributed filesystem from multiple machines
- WatchService Directory path incorrect after renaming Directory
- Are memory-mapped files recognized by the Watch Service API?
- Trigger when a new file is created android
Related Questions in PERSISTENT-VOLUME-CLAIMS
- Persistent Volume State Pending
- How to create hostpath PV for db.sqlite3 database in minikube
- Kubernetes pod cannot attach to in-use volume
- How to upgrade a Helm chart or image version of an application deployment in kubernetes without losing data in associated PV?
- How to share a file inside kube-ovn-monitor pod to another pod in a different namespace involving shared volumes
- ROX volume mounted with readyOnly: false in container
- Unable to mount 2 volumeMounts into nginx container in kubernetese, container start but nginx no
- PersistentVolumeClaims in a pending state
- what are the key resources need to specify in the pv and pvc for storing the files which was uploaded in the website?
- Persistent Volume Claims after Helm reinstall?
- How to Write File from PersistentVolumeClaims in SpringBoot
- nfs share storage class to multiple volume
- Kubernetes PVs and PVCs - access from multiple pods
- PV PVC storage size settings
- What kind of information is stored on the PVC's for Harbor?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
The reason for this behavior is that the Java WatchService can't ensure that file events are correctly generated when using a volume through a bind mount.
This article goes in great depth to why this is the case: https://blog.arkey.fr/2019/09/13/watchservice-and-bind-mount/
The simplest solution to this problem is to check for new files periodically.